--config-value 与 JSON 数组、数字或字符串一起使用会导致内部错误
作者: eyosi1239创建于 2026年9月29日更新于 2026年9月29日
传递一个有效 JSON 值但不是对象的配置值会导致内部错误,而不是配置错误。每个程序都会退出,状态为 1:
--config-value cfg |
结果 |
|---|---|
'[]' |
AttributeError: 'list' 对象没有属性 'items' |
'1' |
AttributeError: 'int' 对象没有属性 'items' |
'"x"' |
AttributeError: 'str' 对象没有属性 'items' |
Python flow.py --config-value cfg '[]' show
内容来源: Netflix/metaflow