Open wlwlwlw2010 opened 1 year ago
found a solution here: https://bobbyhadz.com/blog/python-typeerror-load-missing-1-required-positional-argument-loader
You have to edit "main.py" and change line 29 from "config = yaml.load(open(args.config, 'r'))" to "config = yaml.full_load(open(args.config, 'r'))"
_The Python "TypeError: load() missing 1 required positional argument: 'Loader'" occurs when we use the yaml.load() method without specifying the Loader keyword argument. To solve the error, use the yaml.fullload() method instead or explicitly set the Loader keyword arg.
found a solution here: https://bobbyhadz.com/blog/python-typeerror-load-missing-1-required-positional-argument-loader
You have to edit "main.py" and change line 29 from "config = yaml.load(open(args.config, 'r'))" to "config = yaml.full_load(open(args.config, 'r'))"
_The Python "TypeError: load() missing 1 required positional argument: 'Loader'" occurs when we use the yaml.load() method without specifying the Loader keyword argument. To solve the error, use the yaml.fullload() method instead or explicitly set the Loader keyword arg.
Thanks a lot. You're a lifesaver.
I chang it to "config = yaml.full_load(open(args.config, 'r'))" it worked once and now it won't work anymore. It just says: running on device 0 0it [00:00, ?it/s]
Please help.
It might be related to the input image format. The default is jpg. If you use png then you need to modify the argument.yml
img_format: '.png'
It might be related to the input image format. The default is jpg. If you use png then you need to modify the argument.yml
img_format: '.png'
Thank you that worked😀
Hi, I'm still having this issue even though I've changed line 29 from config = yaml.load(open(args.config, 'r'))
to config = yaml.full_load(open(args.config, 'r'))
. I'm using .png images with img_format: '.png'
and it doesn't work even if i change it back to .jpg .
Hi, how can I solve this problem:
python main.py --config argument.yml Traceback (most recent call last): File "main.py", line 29, in
config = yaml.load(open(args.config, 'r'))
TypeError: load() missing 1 required positional argument: 'Loader'