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

AttributeError: 'module matplotlib.cbook has no attribute 'mplDeprecation' after installing TOBIAS via pip #242

Closed
mano2991 opened this issue Nov 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@mano2991
Copy link

mano2991 commented Nov 3, 2023

After successfully installing TOBIAS using pip, attempting to run it results in an AttributeError related to matplotlib.cbook.

I have posted the error message below for the understanding.

TOBIAS ATACorrect
Traceback (most recent call last):
  File "/home/manoj/anaconda3/bin/TOBIAS", line 33, in <module>
    sys.exit(load_entry_point('tobias==0.16.0', 'console_scripts', 'TOBIAS')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/manoj/anaconda3/bin/TOBIAS", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/manoj/anaconda3/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/manoj/anaconda3/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/manoj/anaconda3/lib/python3.11/site-packages/tobias/TOBIAS.py", line 38, in <module>
    warnings.filterwarnings("ignore", category=matplotlib.cbook.mplDeprecation)
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'matplotlib.cbook' has no attribute 'mplDeprecation'
@msbentsen msbentsen added the bug Something isn't working label Nov 3, 2023
@msbentsen
Copy link
Member

Hi @mano2991 ,

I can confirm this error with matplotlib>=3.8. A quick fix is to downgrade matplotlib to <3.8 using pip:
pip install 'matplotlib<3.8'

I also pushed a new version to the dev-branch of this repository, so you can also reinstall TOBIAS with:
pip install git+https://github.com/loosolab/TOBIAS@dev
The version number with TOBIAS --version should then show 0.16.1-b

I hope this helps!

@mano2991
Copy link
Author

mano2991 commented Nov 6, 2023

Thanks @msbentsen its working now.

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