Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: load() missing 1 required positional argument: 'Loader' #23

Open
gianmarcoaversanoenx opened this issue Oct 3, 2022 · 3 comments

Comments

@gianmarcoaversanoenx
Copy link

Running on Google Colab:

git clone https://github.com/lrjconan/GRAN.git
cd GRAN
pip install -r requirements.txt

so far so good. Then:

python run_exp.py -c config/gran_lobster.yaml

I got

Traceback (most recent call last):
  File "run_exp.py", line 48, in <module>
    main()
  File "run_exp.py", line 17, in main
    config = get_config(args.config_file, is_test=args.test)
  File "/content/GRAN/utils/arg_helper.py", line 39, in get_config
    config = edict(yaml.load(open(config_file, 'r')))
TypeError: load() missing 1 required positional argument: 'Loader'
@msadat67
Copy link

msadat67 commented Oct 5, 2022

Hi
you change load to safeload
config = edict(yaml.safeload(open(config_file, 'r')))

@gianmarcoaversanoenx
Copy link
Author

Hello
thanks for replying.

Yes, I could find a patch. I just wanted to point out that the source code should be updated with a correction.

Best,
Gianmarco

@saart
Copy link

saart commented Apr 10, 2023

For future references: use config = edict(yaml.safe_load(open(config_file, 'r'))) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants