microscope-cockpit / cockpit

Cockpit is a microscope graphical user interface. It is a flexible and easy to extend platform aimed at life scientists using bespoke microscopes.
https://microscope-cockpit.org
GNU General Public License v3.0
37 stars 27 forks source link

python 3.9 thread.isAlive to is_alive #776

Closed juliomateoslangerak closed 3 years ago

juliomateoslangerak commented 3 years ago

It seems that thread's method isAlive() was renamed to is_alive() in python verson 3.9

Exception in thread Experiment-cleanup:
Traceback (most recent call last):
  File "/home/julio/.conda/envs/cockpit/lib/python3.9/threading.py", line 950, in _bootstrap_inner
    self.run()
  File "/home/julio/.conda/envs/cockpit/lib/python3.9/threading.py", line 888, in run
    self._target(*self._args, **self._kwargs)
  File "/home/julio/.conda/envs/cockpit/lib/python3.9/site-packages/cockpit/experiment/experiment.py", line 421, in cleanup
    if saveThread is not None and saveThread.isAlive():
AttributeError: 'Thread' object has no attribute 'isAlive'
carandraug commented 3 years ago

Hi Julio. This has already been fixed on the development release (see f60432b41a59c8e4d373e). At some point, someone should make a new release. Closing as fixed.