Closed NicerNewerCar closed 1 year ago
Is there a qt issue referencing a known problem ?
I could not find an issue on the Qt forums, Amy and I tried a few things to get the QProcess working but nothing seemed to work.
I did have another idea, however, @amymmorton could you add the following line to AutoscoperM.py
at line 351?
print(self.AutoscoperProcess.state())
This will allow us to verify the state of the subprocess right before the connection attempt is made.
To
C:\Users\amorton1\AppData\Local\slicer.org\Slicer 5.3.0-2023-03-27\ slicer.org \Extensions-31693\SlicerAutoscoperM\lib\Slicer-5.3\qt-scripted-modules\AutoscoperM.py
on line 351 added
print(self.AutoscoperProcess.state())
I relaunched slicer and the autoscoperM module, tried to launch autoscoper,
before the error messages was 0:
0
Traceback (most recent call last):
File "C:/Users/amorton1/AppData/Local/slicer.org/Slicer 5.3.0-2023-03-27/slicer.org/Extensions-31693/SlicerAutoscoperM/lib/Slicer-5.3/qt-scripted-modules/AutoscoperM.py", line 249, in onApplyButton
self.logic.startAutoscoper(executablePath)
File "C:/Users/amorton1/AppData/Local/slicer.org/Slicer 5.3.0-2023-03-27/slicer.org/Extensions-31693/SlicerAutoscoperM/lib/Slicer-5.3/qt-scripted-modules/AutoscoperM.py", line 357, in startAutoscoper
self.connectToAutoscoper()
File "C:/Users/amorton1/AppData/Local/slicer.org/Slicer 5.3.0-2023-03-27/slicer.org/Extensions-31693/SlicerAutoscoperM/lib/Slicer-5.3/qt-scripted-modules/AutoscoperM.py", line 310, in connectToAutoscoper
self.AutoscoperSocket = AutoscoperConnection()
File "C:\Users\amorton1\AppData\Local\slicer.org\Slicer 5.3.0-2023-03-27\lib\Python\Lib\site-packages\PyAutoscoper\connect.py", line 24, in init
self.socket = self._openConnection()
File "C:\Users\amorton1\AppData\Local\slicer.org\Slicer 5.3.0-2023-03-27\lib\Python\Lib\site-packages\PyAutoscoper\connect.py", line 103, in _openConnection
s.connect((self.address, 30007))
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
I was able to recreate the error on my desktop. It appears we are getting a Failed to Start
error. Which could be is due to a permission error^1. I will continue to investigate this issue.
Autoscoper process error: 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Failed to Start: 0
Crashed: 1
Timedout: 2
WriteError: 4
ReadError: 3
UnknownError: 5
Note: This is the same issue as described in issue #15 by @kaitohl
Closed via #19
After debugging with @amymmorton it seems that qt.QProcess does not appear to be working on some instances of Windows. However, using the
subprocess
library from Python worked fine.This appears to be related to issue #15