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

Issue with default style #52

Closed
kavanase opened this issue Oct 3, 2024 · 2 comments
Closed

Issue with default style #52

kavanase opened this issue Oct 3, 2024 · 2 comments
Labels

Comments

@kavanase
Copy link
Member

kavanase commented Oct 3, 2024

Using galore on python = 3.10, matplotlib = 3.9.0, I get the following error when --style is not set:

 galore -g 0.1 --w he2 --flipx --xmin -7 -p galore_UPS vasprun.xml.gz
Traceback (most recent call last):
  File "/Users/kavanase/miniconda3/lib/python3.10/site-packages/matplotlib/style/core.py", line 137, in use
    style = _rc_params_in_file(style)
  File "/Users/kavanase/miniconda3/lib/python3.10/site-packages/matplotlib/__init__.py", line 870, in _rc_params_in_file
    with _open_file_or_url(fname) as fd:
  File "/Users/kavanase/miniconda3/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/Users/kavanase/miniconda3/lib/python3.10/site-packages/matplotlib/__init__.py", line 847, in _open_file_or_url
    with open(fname, encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'seaborn-colorblind'

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

Traceback (most recent call last):
  File "/Users/kavanase/miniconda3/bin/galore", line 33, in <module>
    sys.exit(load_entry_point('galore', 'console_scripts', 'galore')())
  File "/Users/kavanase/Packages/galore/galore/cli/galore.py", line 54, in main
    run(**args)
  File "/Users/kavanase/Packages/galore/galore/cli/galore.py", line 72, in run
    simple_dos_from_files(**kwargs)
  File "/Users/kavanase/Packages/galore/galore/cli/galore.py", line 161, in simple_dos_from_files
    matplotlib.pyplot.style.use(kwargs['style'])
  File "/Users/kavanase/miniconda3/lib/python3.10/site-packages/matplotlib/style/core.py", line 139, in use
    raise OSError(
OSError: 'seaborn-colorblind' 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`)

Setting style to a local style file, everything runs fine.

@kavanase kavanase added the bug label Oct 3, 2024
@ajjackson
Copy link
Member

Looks like a different style name should be used for recent matplotlib versions:

https://stackoverflow.com/questions/74716259/the-seaborn-styles-shipped-by-matplotlib-are-deprecated-since-3-6

@ajjackson
Copy link
Member

Fixed in #53

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

No branches or pull requests

2 participants