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

Can't run dynoviz (OSError: 'seaborn' is not a valid package style) #65

Closed
hubertrybka opened this issue Apr 19, 2024 · 4 comments · Fixed by #66
Closed

Can't run dynoviz (OSError: 'seaborn' is not a valid package style) #65

hubertrybka opened this issue Apr 19, 2024 · 4 comments · Fixed by #66
Assignees

Comments

@hubertrybka
Copy link

Hi,

I just installed dynophores using conda.

When running dynoviz -h I get the following error message:

Traceback (most recent call last):
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/style/core.py", line 137, in use
style = _rc_params_in_file(style)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/init.py", line 866, in _rc_params_in_file
with _open_file_or_url(fname) as fd:
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/contextlib.py", line 137, in enter
return next(self.gen)
^^^^^^^^^^^^^^
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/init.py", line 843, in _open_file_or_url
with open(fname, encoding='utf-8') as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'seaborn'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/bmc/miniconda3/envs/dyno/bin/dynoviz", line 6, in
from dynophores.cli import main
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/dynophores/init.py", line 8, in
from .viz import plot, view2d, view3d
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/dynophores/viz/plot/init.py", line 6, in
from . import static
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/dynophores/viz/plot/static.py", line 13, in
plt.style.use("seaborn")
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/style/core.py", line 139, in use
raise OSError(
OSError: 'seaborn' is not a valid package style, path of style file, URL of style file, or library style name (library styles are listed in style.available)

System: Ubuntu 22.04.4 LTS

Thanks for helping me resolve this issue this issue!

@dominiquesydow
Copy link
Collaborator

Hi @hubertrybka,

Thanks for reporting this issue, will bring a fix on its way in a moment.

This issue seems to stem from a deprecation in Matplotlib 3.8.0, where the style seaborn changed to seaborn-v0_8:

Support for the seaborn-<foo> styles; use seaborn-v0_8-<foo> instead, or directly use the seaborn API.

https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.8.0.html#removal-of-deprecated-apis

@dominiquesydow
Copy link
Collaborator

@dominiquesydow
Copy link
Collaborator

@hubertrybka, I made the changes as part of #66 and released the new 0.3.0 tag. I still need to cut a new conda release but will do that over the weekend.

@dominiquesydow
Copy link
Collaborator

Hi @hubertrybka, the new conda release is out :)
https://anaconda.org/conda-forge/dynophores

I will close this issue now but please reopen it if needed.
Many thanks again for bringing this to our attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants