vt-vl-lab / 3d-photo-inpainting

[CVPR 2020] 3D Photography using Context-aware Layered Depth Inpainting

Home Page:https://shihmengli.github.io/3D-Photo-Inpainting/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python main.py --config argument.yml

wlwlwlw2010 opened this issue · comments

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'

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.full_load() method instead or explicitly set the Loader keyword arg.

commented

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.full_load() 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 .