-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
UnicodeDecodeErrors since a9357f30fded4f5934d99e07e23f19d74da18952 #620
Comments
From my testing it seems that it always happens after |
I see RSSI set to Excluding RSSI from |
Easily reproducable with below. I am now confident that it is not something we are doing wrong. But I am not sure how to proceed now, should we just ignore (it does not cause us issues afaics) or report it to the pygi folks? from gi.repository import Gio, GLib, GObject
class MyProxy(Gio.DBusProxy):
__gsignals__ = {str('property-changed'): (GObject.SignalFlags.NO_HOOKS, None,
(GObject.TYPE_PYOBJECT, GObject.TYPE_PYOBJECT, GObject.TYPE_PYOBJECT))
}
def __init__(self, interface_name, obj_path, *args, **kwargs):
super(MyProxy, self).__init__(
g_name="org.bluez",
g_interface_name=interface_name,
g_object_path=obj_path,
g_bus_type=Gio.BusType.SYSTEM,
g_flags=Gio.DBusProxyFlags.NONE,
*args, **kwargs)
self.init()
def do_g_properties_changed(self, changed_properties, _invalidated_properties):
for key, value in changed_properties.unpack().items():
path = self.get_object_path()
print("*%s*" % self.__class__, path, key, value)
self.emit("property-changed", key, value, path)
def print_changed_property(proxy, key, value, path):
print("*connected function*", path, key, value)
proxy = MyProxy("org.bluez.Device1", "/org/bluez/hci0/dev_7C_2F_80_3B_AF_AB")
proxy.connect("property-changed", print_changed_property)
loop = GLib.MainLoop()
loop.run() |
AFAICS the problem is in the virtual function, specifically the invalidated properties. I can work around it by use GET_INVALIDATED_PROPERTIES flags instead of NONE. For reference: |
Found a bug open on it https://bugzilla.gnome.org/show_bug.cgi?id=756009 |
So I guess we can close this as it's not our fault and we have a workaround. |
Yup, closing now that I merged the workaround, |
I have not run python 3 for a while (to make sure we do not break 2.7) but a9357f3 introduced UnicodeDecodeError under python 3 but it is not immediately obvious why. They show up for me when searching for devices just when discovery is stopped. Relevant bits from the logs below.
blueman-applet:
blueman-manager:
The text was updated successfully, but these errors were encountered: