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

AttributeError with Easydict #84

Open
RobloxGuider opened this issue Jul 16, 2020 · 2 comments
Open

AttributeError with Easydict #84

RobloxGuider opened this issue Jul 16, 2020 · 2 comments

Comments

@RobloxGuider
Copy link

I setuped everything and used the command "python main.py --cfg cfg/coco_attn2.yml --gpu 3" but it throw this error:

\Downloads\K.I\AttnGAN\code\miscc\config.py:103: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
yaml_cfg = edict(yaml.load(f))
Traceback (most recent call last):
File "main.py", line 89, in
cfg_from_file(args.cfg_file)
File "C:\Users\timon\Downloads\K.I\AttnGAN\code\miscc\config.py", line 105, in cfg_from_file
_merge_a_into_b(yaml_cfg, __C)
File "C:\Users\timon\Downloads\K.I\AttnGAN\code\miscc\config.py", line 73, in _merge_a_into_b
for k, v in a.iteritems():
AttributeError: 'EasyDict' object has no attribute 'iteritems'

@Sathvik-2412
Copy link

Hey, were you able to solve this?

@ashok2216-A
Copy link

I have fixed this issue:
here is the solution

def cfg_from_file(filename):
"""Load the configuration from a YAML file."""
with open(filename, 'r') as f:
yaml_cfg = edict(yaml.load(f, Loader=yaml.FullLoader))
return yaml_cfg

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