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
Cannot load CLoader #108
Comments
|
Any news on this one? I experience the same error, CLoader does not exist. I think the whole cyaml is missing. Why is that? |
|
This is because cyaml is optional and requires build dependencies, such as This is what it prints when And this is what you'll see if everything is set up fine: |
|
Thanks for the fix! This worked. But I would propose to add such a statement directly in the error message. So if cyaml cannot be compiled but is accessed, it should not just be an |
|
Met with the same problem after installing the pyyaml using"pip3 install pyyaml". So I install yaml from source and fix the problem. See https://github.com/yaml/pyyaml. |
To use pyyaml's CLoader, the package `libyaml-dev` is needed on debian based systems according to yaml/pyyaml#108
To use pyyaml's CLoader, the package `libyaml-dev` is needed on debian based systems according to yaml/pyyaml#108
|
Ran into the same issue as well. I did bad searching, so did not come across this until after I (re) solved it on my own: |
|
This is the minimum to get CLoader compiled and installed as of July 2020. |
|
Closing, as this isn't really a pyyaml bug, just missing deps to the builds... We might accept docs PRs to update the native extension build deps for various distros, but it'll be an endless game of whack-a-mole. |
…and might require a manual install with the use of 'python setup.py --with-libyaml install' when using python virtual enviroments. When manual install is skipped, the virutal enviroment might fail to detect libyaml, 'CLoader' is then not available within PyYAML and fails with an 'ImportError' if 'CLoader' is imported. Error message - ERROR: could not read file /home/user/Projects/edb-terraform/infrastructure-examples/aws-all.yml (module 'yaml' has no attribute 'CLoader') Ref: yaml/pyyaml#108
…and might require a manual install with the use of 'python setup.py --with-libyaml install' when using python virtual enviroments. When manual install is skipped, the virutal enviroment might fail to detect libyaml, 'CLoader' is then not available within PyYAML and fails with an 'ImportError' if 'CLoader' is imported. Error message - ERROR: could not read file /home/user/Projects/edb-terraform/infrastructure-examples/aws-all.yml (module 'yaml' has no attribute 'CLoader') Ref: yaml/pyyaml#108
…and might require a manual install with the use of 'python setup.py --with-libyaml install' when using python virtual enviroments. When manual install is skipped, the virutal enviroment might fail to detect libyaml, 'CLoader' is then not available within PyYAML and fails with an 'ImportError' if 'CLoader' is imported. Error message - ERROR: could not read file /home/user/Projects/edb-terraform/infrastructure-examples/aws-all.yml (module 'yaml' has no attribute 'CLoader') Ref: yaml/pyyaml#108
Issue: When manual install is skipped, the virtual environment might fail to detect `libyaml`, `CLoader` is then not available within `PyYAML` and fails with an `ImportError` if `CLoader` is imported. Error message - `ERROR: could not read file /home/user/Projects/edb-terraform/infrastructure-examples/aws-all.yml (module 'yaml' has no attribute 'CLoader')` Ref: yaml/pyyaml#108 Fix: Use `safe_load` instead of using `CLoader`, which depends on `libyaml` and might require a manual install with the use of `python setup.py --with-libyaml install` when using python virtual environments. Other Changes: * Removed unused `security_group_ids` variable from AWS modules root variable file * added `ImportError` to `try/except` import
Issue: When manual install is skipped, the virtual environment might fail to detect `libyaml`, `CLoader` is then not available within `PyYAML` and fails with an `ImportError` if `CLoader` is imported. Error message - `ERROR: could not read file /home/user/Projects/edb-terraform/infrastructure-examples/aws-all.yml (module 'yaml' has no attribute 'CLoader')` Ref: yaml/pyyaml#108 Fix: Use `safe_load` instead of using `CLoader`, which depends on `libyaml` and might require a manual install with the use of `python setup.py --with-libyaml install` when using python virtual environments. Other Changes: * Removed unused `security_group_ids` variable from AWS modules root variable file * added `ImportError` to `try/except` import
Hi, I'm using pyyaml in a Docker container based on bitnami/minideb:jessie, where python version is 2.7.9.
The original code is using CLoader and I cannot change it. Any reason CLoader fails to load but Loader is fine ?
I cannot figure out what I'm missing here. Any idea ?
Running it from the Docker image python:2.7.9 does not raise any error then:
Thanks for your help.
The text was updated successfully, but these errors were encountered: