nexpy / nexpy

NeXpy provides a high-level python interface to NeXus data contained within a simple GUI. It is designed to provide an intuitive interactive toolbox allowing users both to access existing NeXus files and to create new NeXus-conforming data structures without expert knowledge of the file format.
http://nexpy.github.io/nexpy/
Other
48 stars 21 forks source link

pyqt error #429

Open njweadock opened 8 months ago

njweadock commented 8 months ago

I am having a recurring AttributeError ('QPaintEvent' object has no attribute 'x') when interacting with nexpy windows. When I put my cursor over the plot window in the main nexpy or additional windows, the attached error occurs and repeats every time I move my cursor over the window. I haven't been able to recreate the exact sequence, but the issue has happened each time I open a new nexpy instance, open a new plot window, and load data into it. After manipulating the window size and position a few times the error will show up and happen every subsequent time I move my cursor onto the window. Screenshot 2024-03-18 143708

njweadock commented 8 months ago

Forgot to note that I installed a fresh conda environment for nexpy and the error still occured.

rayosborn commented 8 months ago

Thanks for raising the issue. It may be an incompatibility caused by recent changes to either Matplotlib or PyQt. Please could you let me know what you are running.

>>> import matplotlib
>>> print(matplotlib.__version__)
3.8.2
>>> from nexpy.gui.pyqt import QtVersion
>>> print(QtVersion)
PyQt5 v5.15.8
njweadock commented 8 months ago

I am running matplotlib version 3.7.3 and PyQt5 version v5.15.8. The environment uses python3.8 I'll try updating matplotlib in my environment.

njweadock commented 8 months ago

I set up a new environment running python 3.12. Matplotlib in this instance is 3.8.3 and the error has not shown up so far.