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

When "import pandas_profiling": Get Module YAML has no Attribute SafeLoader #252

Closed
vlstrode opened this issue Sep 9, 2019 · 1 comment
Labels
bug 🐛 Something isn't working

Comments

@vlstrode
Copy link

vlstrode commented Sep 9, 2019

I am using an AWS EC2 Linux Instance. Red Hat Linux (Linux version 4.14.128-112.105.amzn2.x86_64 (mockbuild@ip-10-0-1-243) (gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)) #1 SMP Wed Jun 19 16:53:40 UTC 2019)

I'm using Python 3.7.

I was able to run the Pip Install without a problem. However, when I import the package, I get the following error message:
>>> import pandas_profiling Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.7/site-packages/pandas_profiling/__init__.py", line 17, in <module> from pandas_profiling.config import config File "/usr/local/lib/python3.7/site-packages/pandas_profiling/config.py", line 4, in <module> import confuse File "/usr/local/lib/python3.7/site-packages/confuse.py", line 720, in <module> class Loader(yaml.SafeLoader): AttributeError: module 'yaml' has no attribute 'SafeLoader'

I have also tried loading this from the " https://github.com/pandas-profiling/pandas-profiling/archive/master.zip" and get the same error when trying to use it.

The YAML library which is installed when loading the master.zip displays as shown below:
Requirement already satisfied: pyyaml in /usr/local/lib64/python3.7/site-packages (from confuse>=1.0.0->pandas-profiling==2.3.0) (5.1.2)

These are the only package contents (no SafeLoader Listed):
PACKAGE CONTENTS
composer
constructor
cyaml
dumper
emitter
error
events
loader
nodes
parser
reader
representer
resolver
scanner
serializer
tokens

Any idea what I've done incorrectly?
Thank you!

@vlstrode vlstrode added the bug 🐛 Something isn't working label Sep 9, 2019
@sbrugman
Copy link
Collaborator

sbrugman commented Sep 9, 2019

Thank you for raising this issue.

The problem here lies with the combination of pyyaml (possibly related) and confuse. I'd recommend creating an issue at their issue page.

@sbrugman sbrugman closed this as completed Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants