You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I call python preprocess.py --data_path foo.json --output_format "{response}", I get the error AttributeError: 'set' object has no attribute 'format' because type(output_format) = set and not str.
I also encountered a similar issue when passing a string starting with "-" , but it can be passed by explicitly specifying the parameter name, for example:
importfiredeftest(a, b):
print(a, b)
print(type(a), type(b))
if__name__=="__main__":
fire.Fire(test)
python .\test.py 1 '2 3'
1 2 3
python .\test2.py 1 '""2 3""'
1 2 3
python .\test.py 1 '--2 3'
ERROR: The function received no value for the required argument: b
python .\test.py 1 '\"2 3\"'
python .\test.py 1 '\"\"2 3\"\"'
1 ""2 3""
The correct behavior should be equivalent to
print(1, "2 3")
, so strings args do not need to be parsed.The text was updated successfully, but these errors were encountered: