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
In {plotpy_dir}\items\image\base.py Line 604 - 606 part of BaseImageItem.draw_image()
dest = _scale_rect(
self.data, src_rect, self._offscreen, dst_rect, self.lut, self.interpolate
)
There is an issue when using the 2d histogram example that produces the following error.
File "C:\Users\Username\AppData\Local\Programs\Python\Python312\Lib\site-packages\plotpy\items\image\base.py", line 604, in draw_image
dest = _scale_rect(
^^^^^^^^^^^^
ValueError: Error calling Python override of QFrame::paintEvent(): Invalid destination rectangle (expected tuple of 4 integers)
This Error ends up leaving the painter object open causing a crash, after finding the location changing the dst_rect -> tuple(map(int, dst_rect)) fixes the problem but wanted to make someone aware since it is expected as tuple[float, float, float, float].
The text was updated successfully, but these errors were encountered:
I've just managed to reproduce the issue with PyQt6 (instead of PyQt5 in my initial distribution).
PierreRaybaut
changed the title
Issue with typing for _scale_rect() using floats but expecting intsValueError when trying to plot 2D histogram items with PyQt6Feb 23, 2025
In
{plotpy_dir}\items\image\base.py
Line 604 - 606 part ofBaseImageItem.draw_image()
There is an issue when using the 2d histogram example that produces the following error.
This Error ends up leaving the painter object open causing a crash, after finding the location changing the
dst_rect
->tuple(map(int, dst_rect))
fixes the problem but wanted to make someone aware since it is expected astuple[float, float, float, float]
.The text was updated successfully, but these errors were encountered: