Closed bunnymatic closed 5 years ago
This will happen on any Python 2 system where the device name has a Unicode character in it. The problem was ScanEntry.getValueText()
calling str(val)
on a Unicode string. This should now be fixed in commit a633e489.
Thanks for the update. So moving to Python 3 might also be a good thing?
Yes... the Python maintainers are going to drop support for 2.x in 2020. Making bluepy a Python 3-only project will make it easier to maintain and release, so it's likely I'll stop officially supporting 2.x by 2020 as well.
Using
bluepy
1.2.0 with python 2.7.13, we're running basically theblescan.py
script (with a few local modifications).Every once in a while, we get a packet that fails to return it's scan data with the following exception
I don't have the exact packet data which I realize might make this hard to debug. But I wonder if there is some encoding trick that could be done in in the
getValue
method so that this would be a bit less error-prone. I will likely add sometry/except
in my scanner code for the time being.I'll be investigating in our system. If I dig up more information, I'll try to add it here.
Any ideas what might be going on here?