Issue
I'm having an issue in pycharm while running my debugger : "AttributeError: module 'IPython' has no attribute 'get_ipython'"
The problem is that I don't know what IPython is, I'm not using it, and when i clink on the first link in the error log, I arrive in a file that is not even mine.
More, if I run my code without debugger, this error do not appear.
It looks like this come from matplotlip but it doesn't really help me.
Thank you for any help
Solution
I'm also very annoyed about this bug so I tried some stuff and found a workaround (not clean though...).
I work with venv environments so I just changed the file/code which throws the error.
Go to backend_bases.py. For me it's: \venv\Lib\site-packages\matplotlib\backend_bases.py. Or just click on the last stacktrace.
In line 1744 you find this code:
if sys.modules.get("IPython") is None:
return
Change it and add an else: return statement.
if sys.modules.get("IPython") is None:
return
else:
return
When running without debugger the code does the same so I think that's ok. I don't get an error anymore with this change.
Answered By - Andrej
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.