我可以帮您翻译中文,以下是润色后的内容:
我正在尝试读取 .yaml 文件,但是出现了“找到不可哈希键”错误。下面是参考用的示例代码和 .yaml 文件。
test.py
file_path = "test.yaml"
try:
with open(file_path) as file:
res = yaml.safe_load(file)
except Exception as e:
print("e",e)
test.yaml
jobs:
- job: CLEANUP
connection:
dbms: mysql
user: {{username}}