Skip to content

yaml.safe_load(open_file) deprecated #11

@finbaromahony

Description

@finbaromahony

yaml.safe_load(open_file) has been deprecated
a loader is required as of PyYAML 6.0

Traceback (most recent call last):
  File "/home/vagrant/.pyenv/versions/3.6.11/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/vagrant/.pyenv/versions/3.6.11/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/vagrant/.pyenv/versions/3.6.11/lib/python3.6/site-packages/terrafile/__main__.py", line 11, in <module>
    update_modules(path)
  File "/home/vagrant/.pyenv/versions/3.6.11/lib/python3.6/site-packages/terrafile/__init__.py", line 98, in update_modules
    terrafile = read_terrafile(terrafile_path)
  File "/home/vagrant/.pyenv/versions/3.6.11/lib/python3.6/site-packages/terrafile/__init__.py", line 61, in read_terrafile
    terrafile = yaml.load(open_file)
TypeError: load() missing 1 required positional argument: 'Loader'
make[1]: *** [Makefile:5: import] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions