You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The examples are running fine, but matplotlib is not able to plot the results from the GetNumpyCurve method.
The issue is that the GetNumpyCurve returns a dictionary instead of a numpy array. I was able to run one of the examples once, after rebooting my computer. However, after trying it again, it raised the same error.
The same commands run fine inside Rocky's Python shell.
My Python version is 3.11.5
✅ Expected behavior
The expected behavior would be the matplotlib plot to show up.
📝 Steps to reproduce
In my case, I just cloned the repository, installed pyRocky, and executed the examples.
📃 Relevant log output
This is the output and traceback for the particle_wall_interaction_with_motion.py example.
Download successful. File path:
C:\Users<redacted>\AppData\Local\Temp\pyrocky_etw0hy1l\Lshape_tube.stl
Traceback (most recent call last):
File "C:<redacted>\pyrocky\examples\basic_examples\particle_wall_interaction_with_motion.py", line 104, in
ax.plot(times, mass_flow_in, "b", label="Mass Flow In")
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\axes_axes.py", line 1721, in plot
lines = [*self._get_lines(self, *args, data=data, **kwargs)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\axes_base.py", line 303, in call
yield from self._plot_args(
^^^^^^^^^^^^^^^^
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\axes_base.py", line 494, in _plot_args
axes.xaxis.update_units(x)
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\axis.py", line 1712, in update_units
default = self.converter.default_units(data, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\category.py", line 105, in default_units
axis.set_units(UnitData(data))
^^^^^^^^^^^^^^
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\category.py", line 181, in init
self.update(data)
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\category.py", line 214, in update
for val in OrderedDict.fromkeys(data):
^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'dict'
The text was updated successfully, but these errors were encountered:
🔍 Before submitting the issue
🐞 Description of the bug
The examples are running fine, but matplotlib is not able to plot the results from the GetNumpyCurve method.
The issue is that the GetNumpyCurve returns a dictionary instead of a numpy array. I was able to run one of the examples once, after rebooting my computer. However, after trying it again, it raised the same error.
The same commands run fine inside Rocky's Python shell.
My Python version is 3.11.5
✅ Expected behavior
The expected behavior would be the matplotlib plot to show up.
📝 Steps to reproduce
In my case, I just cloned the repository, installed pyRocky, and executed the examples.
📃 Relevant log output
This is the output and traceback for the particle_wall_interaction_with_motion.py example.
Download successful. File path:
C:\Users<redacted>\AppData\Local\Temp\pyrocky_etw0hy1l\Lshape_tube.stl
Traceback (most recent call last):
File "C:<redacted>\pyrocky\examples\basic_examples\particle_wall_interaction_with_motion.py", line 104, in
ax.plot(times, mass_flow_in, "b", label="Mass Flow In")
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\axes_axes.py", line 1721, in plot
lines = [*self._get_lines(self, *args, data=data, **kwargs)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\axes_base.py", line 303, in call
yield from self._plot_args(
^^^^^^^^^^^^^^^^
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\axes_base.py", line 494, in _plot_args
axes.xaxis.update_units(x)
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\axis.py", line 1712, in update_units
default = self.converter.default_units(data, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\category.py", line 105, in default_units
axis.set_units(UnitData(data))
^^^^^^^^^^^^^^
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\category.py", line 181, in init
self.update(data)
File "C:\Users<redacted>.ansys_python_venvs\Rocky\Lib\site-packages\matplotlib\category.py", line 214, in update
for val in OrderedDict.fromkeys(data):
^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'dict'
The text was updated successfully, but these errors were encountered: