question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: module 'pykwalify.core' has no attribute 'yaml'

See original GitHub issue

Hello, it looks like pykwalify has had a new release (1.8) which is breaking my tavern build with the following error:

ve/lib/python3.8/site-packages/tavern/schemas/files.py:16: in <module>
    core.yaml.safe_load = functools.partial(yaml.load, Loader=IncludeLoader)
E   AttributeError: module 'pykwalify.core' has no attribute 'yaml'

It looks like pykwalify has dropped/changed their default yaml parser which may be the culprit?

Could we maybe get tavern pinned to pykwalify 1.7 until it’s fixed?

https://github.com/Grokzen/pykwalify/releases https://github.com/taverntesting/tavern/blob/master/setup.cfg#L34

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
michaelboultoncommented, Dec 31, 2020

I’ve pushed 1.12.2 which pins pykwalify to 1.7

1reaction
Aton-Kishcommented, May 20, 2021

I get annoying warnings every test because pykwalify 1.7 uses the imp module.

============================================================================ warnings summary ============================================================================
../usr/local/lib/python3.9/site-packages/pykwalify/core.py:7
  /usr/local/lib/python3.9/site-packages/pykwalify/core.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

-- Docs: https://docs.pytest.org/en/stable/warnings.html

Deprecated since version 3.4: The imp module is deprecated in favor of importlib. from https://docs.python.org/3/library/imp.html

Above korvalds’s patch works fine, so could you please upgrade to pykwalify 1.8?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: module 'yaml' has no attribute 'warnings'
I have a similar problem as following picture enter image description here. It is okay now when I install PyYAML package like below...
Read more >
Partial schema issue when used with mapping #71 - GitHub
AttributeError Traceback (most recent call last) <ipython-input-2-6d13cd20baba> in <module>() 45 source_file="data.yml", ...
Read more >
pykwalify - PyPI
pyKwalify. YAML/JSON validation library. This framework is a port with a lot of added functionality of the Java version of the framework kwalify...
Read more >
Python Examples of pykwalify.core.Core - ProgramCreek.com
The following are 12 code examples of pykwalify.core.Core(). ... except SchemaError: raise InvalidDomain("Failed to validate your domain yaml.
Read more >
AttributeError: module 'yaml' has no attribute 'load_all'
Issue - AttributeError: module 'yaml' has no attribute 'load_all' One possible reason, you may have accidentally created a yaml.py file or yaml.py file ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found