Skip to content

[Bug]:matplotlib error on axis (Linear instead of linear) #202

@corazzamtt

Description

@corazzamtt

Contact details

[email protected]

What happened?

Hello,

thank you for opem and gopem. I installed with pip on a silicon mac opem and gopem. I tryed with python3.9 - 3.13 and I have the same error for all versions. When I open gopem the window opens, I am able to run the model with test parameters and I have the possibility to write results on disk. Though, just after that the system crasches for a problem in matplotlib (I guess a letter case problem). I don't have the possibility in the GUI to change the properties of the graph on the right part of the panel (I guess this is possible after plotting, but the system crashes while plotting). This is the error message:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/gopem/mainwindow.py", line 649, in axis_changed
self.plotter.update_plotter_data(
File "/opt/homebrew/lib/python3.9/site-packages/gopem/plotter.py", line 210, in update_plotter_data
self.canvas.update_plot(
File "/opt/homebrew/lib/python3.9/site-packages/gopem/plotter.py", line 104, in update_plot
self.axes.set_yscale(y_scale)
File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/axes/_base.py", line 74, in wrapper
return get_method(self)(*args, **kwargs)
File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/axis.py", line 810, in _set_axes_scale
ax._axis_map[name]._set_scale(value, **kwargs)
File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/axis.py", line 767, in _set_scale
self._scale = mscale.scale_factory(value, self, **kwargs)
File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/scale.py", line 713, in scale_factory
scale_cls = _api.check_getitem(_scale_mapping, scale=scale)
File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/_api/init.py", line 192, in check_getitem
raise ValueError(
ValueError: 'Linear' is not a valid value for scale; supported values are 'linear', 'log', 'symlog', 'asinh', 'logit', 'function', 'functionlog'
zsh: abort python3.9 -m gopem

Thank you, best,

Matteo Corazza

Steps to reproduce

see above

Expected behavior

launch gopem on a silicon mac and just try to launch the model with test parameters. Any python version from 3.9 to 3.13

Actual behavior

no error on matplotlib, I guess 'Linear' should be 'linear' and so on

Operating system

macOS

Python version

Python 3.11

GOPEM version

GOPEM 0.8

Relevant log output

Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.9/site-packages/gopem/mainwindow.py", line 649, in axis_changed
    self.plotter.update_plotter_data(
  File "/opt/homebrew/lib/python3.9/site-packages/gopem/plotter.py", line 210, in update_plotter_data
    self.canvas.update_plot(
  File "/opt/homebrew/lib/python3.9/site-packages/gopem/plotter.py", line 104, in update_plot
    self.axes.set_yscale(y_scale)
  File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/axes/_base.py", line 74, in wrapper
    return get_method(self)(*args, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/axis.py", line 810, in _set_axes_scale
    ax._axis_map[name]._set_scale(value, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/axis.py", line 767, in _set_scale
    self._scale = mscale.scale_factory(value, self, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/scale.py", line 713, in scale_factory
    scale_cls = _api.check_getitem(_scale_mapping, scale=scale)
  File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/_api/__init__.py", line 192, in check_getitem
    raise ValueError(
ValueError: 'Linear' is not a valid value for scale; supported values are 'linear', 'log', 'symlog', 'asinh', 'logit', 'function', 'functionlog'
zsh: abort      python3.9 -m gopem

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions