Open edmundsj opened 3 years ago
I suspect this is due to the thing not being closed properly, because I definitely did that, I got it to work after closing all the other windows that might still be opening the port. This error type appears to be windows-specific and should be added to the exception handler.
C:\Users\Jordan>python Python 3.9.4 (tags/v3.9.4:1f2e308, Apr 4 2021, 13:27:16) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 1, in
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\scippy\source\Keithley2400.py", line 24, in init
super().init(
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\scippy\source\SCPIDevice.py", line 23, in init
self.get_visa_device(device_name=device_name,
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\scippy\source\SCPIDevice.py", line 124, in get_visa_device
self.get_visa_device(
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\scippy\source\SCPIDevice.py", line 92, in get_visa_device
self.device = rm.open_resource(
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa\highlevel.py", line 3304, in open_resource
res.open(access_mode, open_timeout)
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa\resources\resource.py", line 297, in open
self.session, status = self._resource_manager.open_bare_resource(
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa\highlevel.py", line 3232, in open_bare_resource
return self.visalib.open(self.session, resource_name, access_mode, open_timeout)
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa_py\highlevel.py", line 167, in open
sess = cls(session, resource_name, parsed, open_timeout)
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa_py\sessions.py", line 323, in init
self.after_parsing()
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa_py\serial.py", line 89, in after_parsing
self.interface = cls(
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\serial\serialwin32.py", line 33, in init
super(Serial, self).init(*args, **kwargs)
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\serial\serialutil.py", line 244, in init
self.open()
File "C:\Users\Jordan\AppData\Local\Programs\Python\Python39\lib\site-packages\serial\serialwin32.py", line 64, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'COM1': PermissionError(13, 'Access is denied.', None, 5)