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

Error when running python plot_params.py --model wang #4

Open
VahidGh opened this issue Nov 8, 2023 · 0 comments
Open

Error when running python plot_params.py --model wang #4

VahidGh opened this issue Nov 8, 2023 · 0 comments

Comments

@VahidGh
Copy link

VahidGh commented Nov 8, 2023

When trying to run the following command, an error related to the missing of "All_figures" directory appears.
Creating this directory "model-reduction-manifold-boundaries/Parameter_inference_real_data/figures/All_figures/" manually solved the problem.

python plot_params.py --model wang
model-reduction-manifold-boundaries/Parameter_inference_real_data/cmaesfits/plot_params.py:48: MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use ``matplotlib.colormaps[name]`` or ``matplotlib.colormaps.get_cmap(obj)`` instead.
  cmap = matplotlib.cm.get_cmap('winter_r')
Traceback (most recent call last):
  File "model-reduction-manifold-boundaries/Parameter_inference_real_data/cmaesfits/plot_params.py", line 65, in <module>
    plt.savefig('../figures/All_figures/' + filename + '.svg')
  File "model-reduction-manifold-boundaries/env/lib/python3.10/site-packages/matplotlib/pyplot.py", line 1119, in savefig
    res = fig.savefig(*args, **kwargs)  # type: ignore[func-returns-value]
  File "model-reduction-manifold-boundaries/env/lib/python3.10/site-packages/matplotlib/figure.py", line 3390, in savefig
    self.canvas.print_figure(fname, **kwargs)
  File "model-reduction-manifold-boundaries/env/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2193, in print_figure
    result = print_method(
  File "model-reduction-manifold-boundaries/env/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2043, in <lambda>
    print_method = functools.wraps(meth)(lambda *args, **kwargs: meth(
  File "model-reduction-manifold-boundaries/env/lib/python3.10/site-packages/matplotlib/backends/backend_svg.py", line 1328, in print_svg
    with cbook.open_file_cm(filename, "w", encoding="utf-8") as fh:
  File "model-reduction-manifold-boundaries/env/lib/python3.10/site-packages/matplotlib/cbook.py", line 497, in open_file_cm
    fh, opened = to_filehandle(path_or_file, mode, True, encoding)
  File "model-reduction-manifold-boundaries/env/lib/python3.10/site-packages/matplotlib/cbook.py", line 483, in to_filehandle
    fh = open(fname, flag, encoding=encoding)
FileNotFoundError: [Errno 2] No such file or directory: '../figures/All_figures/Params-model-Wang-protocol-staircase1-iid-noise.svg
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

No branches or pull requests

1 participant