NeewerLite-Python icon indicating copy to clipboard operation
NeewerLite-Python copied to clipboard

ImportError: DLL load failed while importing _winrt_windows_devices_bluetooth

Open waynieoaks opened this issue 10 months ago • 4 comments

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.

waynieoaks avatar Apr 03 '24 08:04 waynieoaks

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?

taburineagle avatar Apr 03 '24 12:04 taburineagle

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.

waynieoaks avatar Apr 03 '24 12:04 waynieoaks

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.

waynieoaks avatar Apr 03 '24 13:04 waynieoaks

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!

taburineagle avatar Apr 18 '24 00:04 taburineagle