DP6 / DP6/Marketing-Attribution-Models
[BUG]'seaborn-white' is not a valid package style
- Dominant language
- Python
- Stars
- 369
- Forks
- 87
- Avg merge
- 12h 52m
- Merged PRs (30d)
- 4
Description
when I want to import the library, it gave me this error :
FileNotFoundError Traceback (most recent call last)
[/usr/local/lib/python3.11/dist-packages/matplotlib/style/core.py](https://localhost:8080/#) in use(style)
128 try:
--> 129 style = _rc_params_in_file(style)
130 except OSError as err:
6 frames
[/usr/local/lib/python3.11/dist-packages/matplotlib/__init__.py](https://localhost:8080/#) in _rc_params_in_file(fname, transform, fail_on_error)
902 rc_temp = {}
--> 903 with _open_file_or_url(fname) as fd:
904 try:
[/usr/lib/python3.11/contextlib.py](https://localhost:8080/#) in __enter__(self)
136 try:
--> 137 return next(self.gen)
138 except StopIteration:
[/usr/local/lib/python3.11/dist-packages/matplotlib/__init__.py](https://localhost:8080/#) in _open_file_or_url(fname)
879 fname = os.path.expanduser(fname)
--> 880 with open(fname, encoding='utf-8') as f:
881 yield f
FileNotFoundError: [Errno 2] No such file or directory: 'seaborn-white'
The above exception was the direct cause of the following exception:
OSError Traceback (most recent call last)
[](https://localhost:8080/#) in ()
42 print(f"❌ Error: {e}")
43
---> 44 from marketing_attribution_models import MAM
45 print("✅ Library imported successfully!")
[/usr/local/lib/python3.11/dist-packages/marketing_attribution_models/__init__.py](https://localhost:8080/#) in
----> 1 from .MAM import MAM
[/usr/local/lib/python3.11/dist-packages/marketing_attribution_models/MAM.py](https://localhost:8080/#) in
10 import seaborn as sns
11
---> 12 plt.style.use("seaborn-white")
13
14
[/usr/local/lib/python3.11/dist-packages/matplotlib/style/core.py](https://localhost:8080/#) in use(style)
129 style = _rc_params_in_file(style)
130 except OSError as err:
--> 131 raise OSError(
132 f"{style!r} is not a valid package style, path of style "
133 f"file, URL of style file, or library style name (library "
OSError: 'seaborn-white' 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`)
Contributor guide
Research direction
Start in marketing_attribution_models/MAM.py at the plt.style.use("seaborn-white") call and reproduce the import failure with the reported Matplotlib setup. Check the available style names and update the style reference so importing MAM succeeds without this error; verify by rerunning the reported import.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100