cnr-isti-vclab / TagLab

A CNN based image segmentation tool oriented to marine data analysis
https://taglab.isti.cnr.it/
GNU General Public License v3.0
84 stars 33 forks source link

TagLab crashing when trying to use 4-clicks or Split screen #121

Open damarislanders opened 1 year ago

damarislanders commented 1 year ago

Discussed in https://github.com/cnr-isti-vclab/TagLab/discussions/120

Originally posted by **JohnStratford** October 12, 2023 Hi, Whenever I try to use the '4-clicks segmentation' tool or activate the 'Split screen' function' TagLab freezes for a few minutes then crashes and closes. When this happens, this error message is returned in the Windows Powershell I used to launch the software: **1. After trying to use '4-clicks segmentation':** PS C:\Users\Downloads\TagLab + required packages\TagLab-main> python.exe taglab.py TagLab 2023.5.17 Traceback (most recent call last): File "C:\Users\Downloads\TagLab + required packages\TagLab-main\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' **2. After activating the 'Split screen' function':** PS C:\Users\Downloads\TagLab + required packages\TagLab-main> python.exe taglab.py TagLab 2023.5.17 Traceback (most recent call last): File "C:\Users\Downloads\TagLab + required packages\TagLab-main\source\QtImageViewer.py", line 132, in setViewParameters self.horizontalScrollBar().setValue(posx) TypeError: setValue(self, a0: int): argument 1 has unexpected type 'float' (I am using Windows 11, and I have installed 64-bit Python 3.10.11, CUDA Toolkit 11.6 and the x64 Visual Studio Redistributable.) Does anyone know what is causing these errors and how I can fix them? Thanks for your help!
Jordan-Pierce commented 1 year ago

What version of pyqt5 is installed in your python environment? It's not necessarily a fix, but if you haven't already tried, maybe uninstall and re-install pyqt5

damarislanders commented 1 year ago

Hey thanks for your answer. I am using pyqt5 5.15.10. I uninstalled and reinstalled but the error still occurs when clicking 4-clicks tool.

Jordan-Pierce commented 1 year ago

Yeah no issue there I guess. Are you using an Anaconda environment to install TagLab's dependencies, or is everything being installed in your base python environment? If you're using an conda environment, I have a fork I made for my team to help install TagLab because it was always giving them issues. I'm not sure if the issue you're dealing with has to do with dependencies at all, but I'm currently running the same version of TagLab and it seems to be running okay.

Maybe try cloning my fork and installing using the install script just as a sanity check?

maxcorsini commented 1 year ago

Dear damarislanders,

this types of error is caused by the data type checking of Python 3.10.x . Fix this problems require a lot of work, so for the moment a quick workaround is to change Python version, for example going back to the 3.9. After this, you need to re-run Taglab's install.py to re-install the packages.

Let me know if this works.

Best, Massimiliano