In-Network-Machine-Learning / Planter

Planter is a modular framework for realising in one-click in-network machine learning algorithms.
Apache License 2.0
29 stars 7 forks source link

Bug report #1

Closed SunH4o closed 13 hours ago

SunH4o commented 5 months ago

Dear All:

report

Today I tried to run the Planter step by step according the tutorial in '/src/help/Sample_Tutorial',and I chose the EB model like tutorial.But when I chose to 'Use testing mode',the program reported following error: Traceback (most recent call last): File "/home/p4/miniconda3/envs/planter/lib/python3.9/site-packages/matplotlib/style/core.py", line 137, in use style = _rc_params_in_file(style) File "/home/p4/miniconda3/envs/planter/lib/python3.9/site-packages/matplotlib/init.py", line 870, in _rc_params_in_file with _open_file_or_url(fname) as fd: File "/home/p4/miniconda3/envs/planter/lib/python3.9/contextlib.py", line 117, in enter return next(self.gen) File "/home/p4/miniconda3/envs/planter/lib/python3.9/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'

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

Traceback (most recent call last): File "/home/p4/Workspace/P4/tutorials/exercises/Planter/Planter.py", line 360, in Planter() File "/home/p4/Workspace/P4/tutorials/exercises/Planter/Planter.py", line 247, in Planter model_main.loader.exec_module(main_functions) File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/home/p4/Workspace/P4/tutorials/exercises/Planter/src/models/DT/Type_EB/table_generator.py", line 21, in plt.style.use('seaborn') File "/home/p4/miniconda3/envs/planter/lib/python3.9/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)

solution

  1. It's an error about package 'seaborn',and it happened in ''/src/models/DT/Type_EB/table_generator.py",line 21

  2. I tried to run following program with python3.9 and it reported same error. import seaborn <br> import matplotlib.pyplot as plt <br> plt.style.use('seaborn')

  3. I tried to run following program to find available styles. plt.style.available

  4. the result is a list like following: ['Solarize_Light2', '_classic_test_patch', '_mpl-gallery', '_mpl-gallery-nogrid', 'bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 'seaborn-v0_8', 'seaborn-v0_8-bright', 'seaborn-v0_8-colorblind', 'seaborn-v0_8-dark', 'seaborn-v0_8-dark-palette', 'seaborn-v0_8-darkgrid', 'seaborn-v0_8-deep', 'seaborn-v0_8-muted', 'seaborn-v0_8-notebook', 'seaborn-v0_8-paper', 'seaborn-v0_8-pastel', 'seaborn-v0_8-poster', 'seaborn-v0_8-talk', 'seaborn-v0_8-ticks', 'seaborn-v0_8-white', 'seaborn-v0_8-whitegrid', 'tableau-colorblind10']

  5. It seemed like there was no styles named 'seaborn' but 'seaborn-v0_8'.So I tried to change 'seaborn' in ''/src/models/DT/Type_EB/table_generator.py",line 21 into 'seaborn-v0_8',and it worked!I Successfully moved on to the next step.

  6. I think it's a bug maybe caused by the package update.

Environment

python -V == 3.9.0 seaborn -V == 0.13.2 and 0.11.2(I tried both versions of seaborn)

If you have time, please check if this is a bug.Thank you.

SunH4o commented 5 months ago

Dear All:

report

Today I tried to run the Planter step by step according the tutorial in '/src/help/Sample_Tutorial',and I chose the EB model like tutorial.But when I chose to 'Use testing mode',the program reported following error: Traceback (most recent call last): File "/home/p4/miniconda3/envs/planter/lib/python3.9/site-packages/matplotlib/style/core.py", line 137, in use style = _rc_params_in_file(style) File "/home/p4/miniconda3/envs/planter/lib/python3.9/site-packages/matplotlib/init.py", line 870, in _rc_params_in_file with _open_file_or_url(fname) as fd: File "/home/p4/miniconda3/envs/planter/lib/python3.9/contextlib.py", line 117, in enter return next(self.gen) File "/home/p4/miniconda3/envs/planter/lib/python3.9/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'

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

Traceback (most recent call last): File "/home/p4/Workspace/P4/tutorials/exercises/Planter/Planter.py", line 360, in Planter() File "/home/p4/Workspace/P4/tutorials/exercises/Planter/Planter.py", line 247, in Planter model_main.loader.exec_module(main_functions) File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/home/p4/Workspace/P4/tutorials/exercises/Planter/src/models/DT/Type_EB/table_generator.py", line 21, in plt.style.use('seaborn') File "/home/p4/miniconda3/envs/planter/lib/python3.9/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)

solution

  1. It's an error about package 'seaborn',and it happened in ''/src/models/DT/Type_EB/table_generator.py",line 21
  2. I tried to run following program with python3.9 and it reported same error. import seaborn <br> import matplotlib.pyplot as plt <br> plt.style.use('seaborn')
  3. I tried to run following program to find available styles. plt.style.available
  4. the result is a list like following: ['Solarize_Light2', '_classic_test_patch', '_mpl-gallery', '_mpl-gallery-nogrid', 'bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 'seaborn-v0_8', 'seaborn-v0_8-bright', 'seaborn-v0_8-colorblind', 'seaborn-v0_8-dark', 'seaborn-v0_8-dark-palette', 'seaborn-v0_8-darkgrid', 'seaborn-v0_8-deep', 'seaborn-v0_8-muted', 'seaborn-v0_8-notebook', 'seaborn-v0_8-paper', 'seaborn-v0_8-pastel', 'seaborn-v0_8-poster', 'seaborn-v0_8-talk', 'seaborn-v0_8-ticks', 'seaborn-v0_8-white', 'seaborn-v0_8-whitegrid', 'tableau-colorblind10']
  5. It seemed like there was no styles named 'seaborn' but 'seaborn-v0_8'.So I tried to change 'seaborn' in ''/src/models/DT/Type_EB/table_generator.py",line 21 into 'seaborn-v0_8',and it worked!I Successfully moved on to the next step.
  6. I think it's a bug maybe caused by the package update.

Environment

python -V == 3.9.0 seaborn -V == 0.13.2 and 0.11.2(I tried both versions of seaborn)

If you have time, please check if this is a bug.Thank you.

OK,I found that it could be an issue with matplotlib's version.Yesterday I chose to install matplotlib ,which version is 3.9.0.Today I changed it to 3.3.2,like described in tutorials,and this error was gone.