portugueslab / stytra

A modular package to control stimulation and track behaviour
http://www.portugueslab.com/stytra/
GNU General Public License v3.0
41 stars 26 forks source link

Newer pyqtgraph releases (>0.13.0) no longer supports GraphicsWindow #87

Closed ryosukecooltanaka closed 4 months ago

ryosukecooltanaka commented 1 year ago

StreamingPositionPlot() in fishplots.py uses the GraphicsWindow attribute in pyqtgraph, which apparently no longer exists in the latest release (>0.13.0) (stytra protocols wouldn't run due to the AttributeError). Installing stytra with pip currently automatically installs the latest version of pyqtgraph. Downgrading pyqtgraph 0.12.4 fixed the issue.

DaniParr commented 11 months ago

Editing fishplots.py from "class StreamingPositionPlot(pg.GraphicsWindow):" to "class StreamingPosition(pg.GraphicsView):" in line 16 and that solved that issue. However, when I run it again another issue arises with utilities.py. I then changed "if isinstance(v, collections.Mapping):" to "if isinstance(v, collections.ChainMap):" in line 242 and then running "python -m stytra.examples.looming_exp" worked fine for me! :)

nvbln commented 4 months ago

I will close this as it has been fixed by PR #93.