delsys-inc / Delsys-Python-Demo

Python example GUI that utilizes the Delsys API
10 stars 3 forks source link

Unable to find assembly '/resources/DelsysAPI'. #1

Open felixmaldonadoos opened 3 years ago

felixmaldonadoos commented 3 years ago

Hey, so this week I began working with the Delsys API for school and have some problems with the SiUSBXp.dll import. I added it to my resources folder (I just added the SiUSBXp.dll file, not the whole DelsysAPI.Core from the Delsys website) but get the same issue. I tried changing the '/resources/DelsysAPI' to the full path (didnt work) also tried changing it to '/resources/DelsysAPI.Core' and didnt work either.

When I run the 'TrignoBase.py' file I get this error: System.IO.FileNotFoundException: Unable to find assembly '/resources/DelsysAPI'. at Python.Runtime.CLRModule.AddReference(String name)

When I run the 'Python_Demo_MultiThreaded.py' file I get this error: (currently have no sensors connected when I ran it but location path errors still occur when I do).

(py36) PS C:\Delsys-Python-Demo-master> python .\Python_Demo_MultiThreaded.py
Traceback (most recent call last):
  File ".\Python_Demo_MultiThreaded.py", line 1, in <module>
    from UIControls.FrameController import *
  File "C:\Delsys-Python-Demo-master\UIControls\FrameController.py", line 1, in <module>
    from DataCollector.CollectDataWindow import CollectDataWindow
  File "C:\Delsys-Python-Demo-master\DataCollector\CollectDataWindow.py", line 5, in <module>
    from DataCollector.CollectDataController import *
  File "C:\Anaconda\envs\py36\lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "C:\Delsys-Python-Demo-master\DataCollector\CollectDataController.py", line 9, in <module>
    from AeroPy.TrignoBase import *
  File "C:\Anaconda\envs\py36\lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "C:\Delsys-Python-Demo-master\AeroPy\TrignoBase.py", line 5, in <module>
    clr.AddReference("/resources/DelsysAPI")
System.IO.FileNotFoundException: Unable to find assembly '/resources/DelsysAPI'.
   at Python.Runtime.CLRModule.AddReference(String name) 

Any information/help would be great. Thank you

ykhan1998 commented 3 years ago

Try the solution in the link below https://stackoverflow.com/questions/28840880/pythonnet-filenotfoundexception-unable-to-find-assembly

Kshitiz-Bansal commented 2 years ago

Thanks so much. It worked.