-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
If I try and connect to a ps2000 with this code:
from picoscope import ps2000
ps = ps2000.PS2000()
and I dont have anything connected, I get this in the console:
Exception ignored in: <function _PicoscopeBase.__del__ at 0x00000266E0C10180>
Traceback (most recent call last):
File "C:\Users\Prem Netsuwan\Documents\tpeng\testing\python-test\.venv\Lib\site-packages\picoscope\picobase.py", line 1139, in __del__
File "C:\Users\Prem Netsuwan\Documents\tpeng\testing\python-test\.venv\Lib\site-packages\picoscope\picobase.py", line 1131, in close
File "C:\Users\Prem Netsuwan\Documents\tpeng\testing\python-test\.venv\Lib\site-packages\picoscope\ps2000.py", line 167, in _lowLevelCloseUnit
File "C:\Users\Prem Netsuwan\Documents\tpeng\testing\python-test\.venv\Lib\site-packages\picoscope\ps2000.py", line 340, in checkResult
OSError: Error calling _lowLevelCloseUnit
It seems like the close method is getting called, even though the picoscope was never connected, which results in this error. Since the error occurred in the __del__ method, python swallows and prints and there is no way for me to catch it. This causes extra stuff to get printed to the console which is unclear how I can avoid.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels