Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

yamldcop.py incompatible with YAML library? #38

Open
rpgoldman opened this issue Feb 22, 2022 · 0 comments
Open

yamldcop.py incompatible with YAML library? #38

rpgoldman opened this issue Feb 22, 2022 · 0 comments

Comments

@rpgoldman
Copy link

rpgoldman commented Feb 22, 2022

After tweaking my issue with the version of PuLP (#37), I tried the test case again, and this time I get an error in yamldcop.py:

$ pydcop solve --algo dpop graph-coloring.yaml
Traceback (most recent call last):
  File "/Users/rpg/.virtualenvs/pydcop/bin/dcop.py", line 181, in <module>
    main()
  File "/Users/rpg/.virtualenvs/pydcop/bin/dcop.py", line 112, in main
    args.func(args)
  File "/Users/rpg/.virtualenvs/pydcop/lib/python3.9/site-packages/pydcop/commands/solve.py", line 254, in run_cmd
    dcop = load_dcop_from_file(args.dcop_files)
  File "/Users/rpg/.virtualenvs/pydcop/lib/python3.9/site-packages/pydcop/dcop/yamldcop.py", line 80, in load_dcop_from_file
    return load_dcop(content)
  File "/Users/rpg/.virtualenvs/pydcop/lib/python3.9/site-packages/pydcop/dcop/yamldcop.py", line 84, in load_dcop
    loaded = yaml.load(dcop_str)
TypeError: load() missing 1 required positional argument: 'Loader'

There's no version specification for pyyaml, so that's likely the problem here. Looking at the pyyaml changelog, we see that the load function was changed to require a Loader with version 6.0

Parsing does better when I downgrade to version 5.4.1, so that's probably a good idea.

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

No branches or pull requests

1 participant