-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I try to load a test model into pysimlink. I do a simple:
model = Model("testmodel", "./testmodel.zip", generator='MinGW Makefiles')
After compile step I get an error loading the generated module:
(_venv) D:\Python\pySimlink>python main.py
Compiling ... done
Traceback (most recent call last):
File "D:\Python\pySimlink\main.py", line 14, in
model = Model("testmodel", "./testmodel.zip", generator='MinGW Makefiles')
File "D:\Python\pySimlink_venv\lib\site-packages\pysimlink\lib\model.py", line 92, in init
self.module = importlib.import_module(self.model_paths.module_name)
File "C:\Program Files\Python39\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 565, in module_from_spec
File "", line 1173, in create_module
File "", line 228, in _call_with_frames_removed
ImportError: DLL load failed while importing testmodel_interface_c: Das angegebene Modul wurde nicht gefunden.<
I set up a virtual environment in Python 3.9.9 with just the requirements needed for pysimlink. I also had to comment out the two lines for locking / unlocking as described in #17 .
The file "D:\Python\pySimlink\__pycache__\pysimlink\testmodel\build\out\library\testmodel_interface_c.cp39-win_amd64.pyd" is generated and is located in the given folder.