NeewerLite-Python
NeewerLite-Python copied to clipboard
ImportError: DLL load failed while importing _winrt_windows_devices_bluetooth
Hello
Not having an issue on Windows 10, but on Windows 11 I am seeing the following:
ImportError: DLL load failed while importing _winrt_windows_devices_bluetooth: The specified module could not be found.
I have installed Python 3.12 and bleak - this happens in http mode when trying to discover lights. I have tried googling the issue and am told to use os.add_dll_directory but still struggling to get this working.
EDIT: I see in issue #44 that this is a Windows 11 issue. I could rollback to Windows 10 but I know it would be a short term solution until Windows 10 reaches end of life. I am happy to play guinea pig if it helps resolve in general - although I am not python savvy so may not be the best of help.
Many thanks.
Hi @waynieoaks - hmm...
I'm curious, I have Windows 11 on my laptop and everything seems to work fine, but I have to check into which versions of Python, bleak, etc. I'm running, as I don't have the laptop with me at the moment. I think I have Python 3.10.xx, as I recall PySide2 not working with later versions the last time I checked into updating Python on the system I was on. Are you using the latest commit of NeewerLite-Python, or one of the older releases?
Hi,
Using the latest release 0.12d. When I get home tonight I could try and roll back Python to 3.10 and see if that makes a difference? The other option is rolling my OS to Windows 10 but this will fix for me but not the overall issue :-)
What I did was install Python 3.12 pip3 install bleak Run script with --http Error on trying to discover lights
As you said, PySide2 not working but this is all for automation so not an issue for me
Many thanks.
Confirmed: Issue seems to be isolated to Python 3.12 on Windows 11.
Uninstalling and installing Python 3.10 fixed the issue for me - and to be 100% sure I did it with Python 3.11 It does just seem to be something in 3.12 in Windows 11.
Interesting - I'm curious why that is though, Python 3.12 must have a different set of dependencies than 3.11 does... I'll have to check into that when I have some time!