Replies: 1 comment 1 reply
-
Hi jjherlan, since Python 3.10.x, Python introduces type checking. These checks create problems with PyQt, since sometime an integer is expected and not a floating point number. To fix this problem, simply go in the code and put int(..) around the argument, i.e. setValue( int(posx*zf) ). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello from NYC,
I am currently trying to segment corals from reefs at Rapa Nui (Easter Island) as part of my PhD research.
I am using a .png file - RGB,- 8357 x 20876 pixels.
Although, I do get this when checking PyTorch version in Python:
torch.version
'2.1.0.dev20230701+cu121'
Anyway, I get the following error when clicking in the Map Preview pane =
Traceback (most recent call last):
File "/home/jherlan/TagLab/source/QtImageViewer.py", line 247, in center
self.horizontalScrollBar().setValue(posx * zf)
TypeError: setValue(self, a0: int): argument 1 has unexpected type 'float'
And, the following error when clicking the 4-click segmentation tool =
Traceback (most recent call last):
File "/home/jherlan/TagLab/source/QtImageViewerPlus.py", line 627, in drawForeground
painter.drawLine(self.mouseCoords.x(), rect.top(), self.mouseCoords.x(), rect.bottom())
TypeError: arguments did not match any overloaded call:
drawLine(self, l: QLineF): argument 1 has unexpected type 'float'
drawLine(self, line: QLine): argument 1 has unexpected type 'float'
drawLine(self, x1: int, y1: int, x2: int, y2: int): argument 1 has unexpected type 'float'
drawLine(self, p1: QPoint, p2: QPoint): argument 1 has unexpected type 'float'
drawLine(self, p1: Union[QPointF, QPoint], p2: Union[QPointF, QPoint]): argument 1 has unexpected type 'float'
Aborted
Any suggestions would be appreciated, thank you in advance.
Regards,
James
Beta Was this translation helpful? Give feedback.
All reactions