0
對於自動化測試腳本插入UUID成YAML時,我想在運行時生成隨機UUID值,所以增加了一些YAML,看起來像這樣:錯誤使用「!!蟒/對象」
---
applicant:
idNumbers:
nationalId: !!python/object:uuid.uuid4
ConstructorError: expected a mapping node, but found scalar
in "<unicode string>", line 4, column 17:
nationalId: !!python/object:uuid.uuid4
^
如何通過注入YAML的標籤的UUID值:
然而,當我嘗試yaml.load
值這會產生一個錯誤?