AWS Thinkbox Discussion Forums

Python3 errors in Monitor

I’m on Deadline Monitor v10.1.20.3

I get many python errors related to using a specific python version.

When forcing Python3 (opt/Thinkbox/Deadline10/bin/deadlinemonitor -py-ver 3), if an exception is raised, the monitor crashes - even if it’s handled. This is in a context-menu Job script.

Aborted (core dumped)

So I tried switching back to Python 2 -py-ver 2 and now the Monitor UI doesn’t fully load and I get a whole lot of these errors in my shell:

  File "UI/Forms/MonitorDockWidget.py", line 442, in restoreWidgetState
  File "UI/DisplayWidgets/TasksListWidget.py", line 40, in restoreWidgetState
  File "UI/DisplayWidgets/FilterListWidget.py", line 88, in restoreWidgetState
TypeError: unable to convert a QVariant back to a Python object

Traceback (most recent call last):
  File "UI/Forms/MainWindow.py", line 1060, in loadSettings
TypeError: unable to convert a QVariant back to a Python object

Time to initialize main window: 215.000 ms
PYTHON: Traceback (most recent call last):
PYTHON:   File "UI/DisplayWidgets/JobListWidget.py", line 58, in onDockWidgetActivated
PYTHON: AttributeError: 'NoneType' object has no attribute 'refreshSelection'
PYTHON: Traceback (most recent call last):
PYTHON:   File "UI/DisplayWidgets/SlaveListWidget.py", line 65, in onDockWidgetActivated
PYTHON: AttributeError: 'NoneType' object has no attribute 'refreshSelection'
Main Window shown
Python 2.7.13 | packaged by Thinkbox Software | (default, Nov 19 2021, 22:46:27) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
Time to show main window: 9.000 ms
'/home/jlehrman/Thinkbox/Deadline10/pythonAPIs/wcp5fkVBSl5Yy30l3VokcA==' already exists. Skipping extraction of PythonSync.
PYTHON: Traceback (most recent call last):
PYTHON:   File "UI/DisplayWidgets/JobListWidget.py", line 58, in onDockWidgetActivated
PYTHON: AttributeError: 'NoneType' object has no attribute 'refreshSelection'
PYTHON: Traceback (most recent call last):
PYTHON:   File "UI/DisplayWidgets/JobListWidget.py", line 58, in onDockWidgetActivated
PYTHON: AttributeError: 'NoneType' object has no attribute 'refreshSelection'
PYTHON: Traceback (most recent call last):
PYTHON:   File "UI/DisplayWidgets/JobListWidget.py", line 58, in onDockWidgetActivated
PYTHON: AttributeError: 'NoneType' object has no attribute 'refreshSelection'
Listener Thread - OnConnect: Listener Socket has been closed.

I then tried cleaning up all the pyc in the /opt/Thinkbox/Deadline10 path and now there are modules missing.

Is it not safe to switch between Python 2 and 3? Is there a way to deal with exceptions (when using Python3) that won’t crash the monitor every time?

You should not delete pyc files you do not know about - there are modules included as compiled files, that do not have corresponding py sources to compile from.

Now, I don’t know about the specific crash. What is refreshSelection a method of? What plugin is this?

You could try the faulthandler module to globally catch the error and prevent the crash.
Normally there is no large difference between py 2 and 3. It could be that 3 is trying to use a faulty compiled module and thus triggering a core dump.

Hi Mois,

Thanks for the quick response. Good to know there’s no known larger issue. I’ll try and isolate and then circle back.

Cheers,

Jesse

Privacy | Site terms | Cookie preferences