Kvaser / pycanlib

The pycanlib package is a Python wrapper for Kvaser CANlib SDK.
https://pycanlib.readthedocs.io
MIT License
16 stars 4 forks source link

QT QML engine fails to load .py file with canlib import inside #4

Open AlexanderPoverennov opened 1 year ago

AlexanderPoverennov commented 1 year ago

QT QML (Pyside6) engine fails to load and show windows of application if there's an import like this: from canlib import canlib. The root cause of the problem is calling the WIN32 API SetDefaultDllDirectories() in dllLoader.py. Here you can find it: https://github.com/Kvaser/pycanlib/blob/v1.22.565/canlib/dllLoader.py#L191 The problem described here: https://stackoverflow.com/questions/75395798/qqmlapplicationengine-failed-to-load-component-when-im-trying-to-use-external-l

kvanfr commented 1 year ago

Thank you for bringing this to our attention and providing the likely cause. We are looking into it.