You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote a simple Python script that uses niswitch but forgot to install the NI-SWITCH driver runtime.
I got the following error:
C:\Users\mkirsch>python ceip_test.py
Traceback (most recent call last):
File "C:\Users\mkirsch\ceip_test.py", line 44, in <module>
with niswitch.Session(resource_name="2510") as s:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mkirsch\AppData\Local\Programs\Python\Python311\Lib\site-packages\niswitch\session.py", line 1362, in __init__
interpreter = _library_interpreter.LibraryInterpreter(encoding='windows-1251')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mkirsch\AppData\Local\Programs\Python\Python311\Lib\site-packages\niswitch\_library_interpreter.py", line 58, in __init__
self._library = _library_singleton.get()
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mkirsch\AppData\Local\Programs\Python\Python311\Lib\site-packages\niswitch\_library_singleton.py", line 50, in get
ctypes_library = ctypes.CDLL(_get_library_name())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mkirsch\AppData\Local\Programs\Python\Python311\Lib\ctypes\__init__.py", line 366, in __init__
if '/' in name or '\\' in name:
^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
Description of issue
I wrote a simple Python script that uses
niswitch
but forgot to install the NI-SWITCH driver runtime.I got the following error:
I expected
DriverNotInstalledError
It's not good if we broke this and our automated testing (unit testing in this case) didn't catch it.
System report
Steps to reproduce issue
On a system in which NI-SWITCH driver runtime is not installed, run the following script:
The text was updated successfully, but these errors were encountered: