无法应用网络设置,请通过本机连接到蓝牙网络

无法应用网络设置,请通过本机连接到蓝牙网络

更新到 Ubuntu 16.04 后,我从 14 开始遇到

无法应用网络设置。

我找到了这个https://github.com/blueman-project/blueman/issues/513但我正在运行最新版本的 Ubuntu。我从 stack overflow 找到的建议似乎不相关。

完整错误:

org.freedesktop.DBus.Python.UnicodeDecodeError: Traceback (most recent call last):   File "/usr/lib/python3/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)   File "/usr/lib/python3/dist-packages/blueman/main/DbusService.py", line 36, in wrapper
    return method(*args[1:], **kwargs)   File "/usr/lib/python3/dist-packages/blueman/plugins/mechanism/Network.py", line 63, in ReloadNetwork
    nc = NetConf.get_default()   File "/usr/lib/python3/dist-packages/blueman/main/NetConf.py", line 219, in get_default
    obj = pickle.load(f) UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)

答案1

这是解决方法Ubuntu 启动板

修补对于 /usr/lib/python3/dist-packages/blueman/main/NetConf.py 是

diff --git a/blueman/main/NetConf.py b/blueman/main/NetConf.py
index 61f5a63..24268df 100644
--- a/blueman/main/NetConf.py
+++ b/blueman/main/NetConf.py
@@ -299,7 +299,7 @@ def get_default(cls):
         NetConf.default_inst = obj
         f.close()
         return obj
- except IOError:
+ except (IOError, UnicodeDecodeError):
         n = cls()
         try:
             n.store()

相关内容