-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: 'org.bluez.Device1' #1507
Comments
Enabling debug logs should at least show us the order in which things are happening to try to see where the issue is. (It could be helpful to compare with the "good" debug logs from the other issue to see what the difference is.) |
Of course, I should have made an shared the debug log in the first place, will do this today. thank you. |
Log attached below; it's quite large but fortunately the problem popped up within the first few minutes. It starts with a discovery and then finds the first devices. The program attempts to connect and poll these, but the first few ones fail: my guess is that people just carried in a box with 40 devices into the building but are not properly within range yet. These failed attempts are expected and should not matter. (Timeouts, A bit later (approx line 2475) some devices are properly connected and polled, all is well until line 7657 where the first error pops up:
This repeats once or twice, until a few seconds later it repeats over and over and all communication basically stopped. |
If Is there any reason bleak/bleak/backends/bluezdbus/manager.py Lines 211 to 217 in 17d4374
Or raise bleak/bleak/backends/bluezdbus/manager.py Line 826 in 17d4374
|
apart from how the error is or should be handled inside bleak: is there something i am doing wrong to cause this in the first place? |
It looks like you have spotted the bug. We can add the check you suggest to be safe but I think we also want to |
No, I don't think so. It is normal for devices to disappear from BlueZ after some time. |
Thank you. Let me know if there is anything I can run to test, repro-wise or fix-wise. |
You could test the proposed fix in #1511 |
Installed the PR branch, testing will have to wait until tomorrow morning when all the devices are back online. Thanks. |
#1511 looks good so far. |
I'm having a very hard time getting my code to run stable; i'm basically round-robin polling about 60 bluetooth devices (For details of my setup see #1500)
Apart from the occasional problem at the kernel/driver level, my code often runs into the error below:
I can't seem to relate this to anything I'm doing as none of my code is in the traceback - what could be the cause of above message, and how do I avoid this situation?
Thank you
The text was updated successfully, but these errors were encountered: