Arch-Linux

Blueman:RecentConns ‘NoneType’ 對像不可迭代

  • May 10, 2017

manjaro 的最後一次更新,由於某種原因不再允許我啟用 blueman。這是錯誤:

  Connection Failed: Traceback (most recent call last):
     File "/usr/lib/python3.4/site-packages/dbus/service.py", line 707, in _message_cb
       retval = candidate_method(self, *args, **keywords)
     File "/usr/lib/python3.4/site-packages/blueman/main/DbusService.py", line 36, in wrapper
       return method(*args[1:], **kwargs)
     File "/usr/lib/python3.4/site-packages/blueman/plugins/applet/DBusService.py", line 76, in connect_service
       self.Applet.Plugins.RecentConns.notify(service)
     File "/usr/lib/python3.4/site-packages/blueman/plugins/applet/RecentConns.py", line 261, in notify
       for i in RecentConns.items:
   TypeError: 'NoneType' object is not iterable

blueman-applet

blueman-applet:1811): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2:19: Theming engine 'adwaita' not found
blueman-applet version 2.0 starting
Stale PID, overwriting
/usr/lib/python3.4/site-packages/gi/overrides/__init__.py:313: Warning: The property GSettings:schema is deprecated and shouldn't be used anymore. It will be removed in a future version.
 return super_init_func(self, **new_kwargs)
_________
Load (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:60)
['NMDUNSupport', 'PowerManager', 'DhcpClient', 'AppIndicator', 'ExitItem', 'TransferService', 'GameControllerWakelock', 'Menu', 'PPPSupport', 'ShowConnected', 'Networking', 'StandardItems', 'AuthAgent', 'DBusService', 'SerialManager', 'KillSwitch', 'DiscvManager', 'NMPANSupport', 'StatusIcon', 'RecentConns', 'Headset', 'NetUsage'] 
_________
Load (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:60)
Unable to load plugin module AppIndicator
cannot import name AppIndicator3, introspection typelib not found 
_________
get_interface_version (/usr/lib/python3.4/site-packages/blueman/bluez/BlueZInterface.py:13)
Detected BlueZ 5 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.Headset.Headset'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.TransferService.TransferService'> 
_________
get_interface_version (/usr/lib/python3.4/site-packages/blueman/bluez/obex/Base.py:20)
Detected BlueZ integrated obexd 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.StatusIcon.StatusIcon'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.Menu.Menu'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.ExitItem.ExitItem'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.StandardItems.StandardItems'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.Networking.Networking'> 
_________
load_nap_settings (/usr/lib/python3.4/site-packages/blueman/plugins/applet/Networking.py:36)
Loading NAP settings 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.AuthAgent.AuthAgent'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
Not loading DhcpClient because it's conflict has higher priority 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.DiscvManager.DiscvManager'> 
_________
update_menuitems (/usr/lib/python3.4/site-packages/blueman/plugins/applet/DiscvManager.py:123)
warning: Adapter is None 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.RecentConns.RecentConns'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.PowerManager.PowerManager'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.ShowConnected.ShowConnected'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.GameControllerWakelock.GameControllerWakelock'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.DBusService.DBusService'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
Not loading PPPSupport because it's conflict has higher priority 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.NMDUNSupport.NMDUNSupport'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.SerialManager.SerialManager'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.NMPANSupport.NMPANSupport'> 
_________
__load_plugin (/usr/lib/python3.4/site-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.applet.KillSwitch.KillSwitch'> 
_________
io_event (/usr/lib/python3.4/site-packages/blueman/plugins/applet/KillSwitch.py:72)
killswitch registered 1 
_________
io_event (/usr/lib/python3.4/site-packages/blueman/plugins/applet/KillSwitch.py:72)
State: False 
_________
UpdatePowerState (/usr/lib/python3.4/site-packages/blueman/plugins/applet/PowerManager.py:159)
off True 
foff False 
on True 
current state True 
new state False 
_________
UpdatePowerState (/usr/lib/python3.4/site-packages/blueman/plugins/applet/PowerManager.py:159)
Signalling False 
_________
_on_obex_owner_changed (/usr/lib/python3.4/site-packages/blueman/plugins/applet/TransferService.py:170)
obex owner changed: :1.45 
_________
on_dbus_name_owner_change (/usr/bin/blueman-applet:94)
org.bluez owner changed to :1.2 
_________
set_nap (/usr/lib/python3.4/site-packages/blueman/plugins/applet/Networking.py:65)
set nap False 
_________
register_agent (/usr/lib/python3.4/site-packages/blueman/plugins/applet/AuthAgent.py:63)
Registering agent 
_________
enumerate_connections (/usr/lib/python3.4/site-packages/blueman/plugins/applet/ShowConnected.py:50)
Found 0 existing connections 
_________
on_registered (/usr/lib/python3.4/site-packages/blueman/bluez/obex/AgentManager.py:18)
/org/blueman/obex_agent 
_________
RequestPowerState (/usr/lib/python3.4/site-packages/blueman/plugins/applet/PowerManager.py:131)
Requesting True 
_________
on_power_state_change_requested (/usr/lib/python3.4/site-packages/blueman/plugins/applet/KillSwitch.py:119)
True 
_________
UpdatePowerState (/usr/lib/python3.4/site-packages/blueman/plugins/applet/PowerManager.py:159)
off True 
foff False 
on False 
current state False 
new state False 
_________
check (/usr/lib/python3.4/site-packages/blueman/plugins/applet/PowerManager.py:119)
callbacks done 
_________
set_adapter_state (/usr/lib/python3.4/site-packages/blueman/plugins/applet/PowerManager.py:90)
True 
_________
set_adapter_state (/usr/lib/python3.4/site-packages/blueman/plugins/applet/PowerManager.py:90)
Exception occurred org.bluez.Error.Blocked: Blocked through rfkill 

安裝了 gnome-themes-standard。

他們在 github 上將我的票標記為 bug,我想我永遠不會收到答案,必須等到 blueman 的下一個版本才能修復它。我等不及了,xfce 是否有另一個藍牙小程序可用?

我跑了

sudo rfkill unblock bluetooth

它似乎有效,但是在 github 上,Christopher Schramm 重新打開了我的票並仍然標記為錯誤,也許他正在調查我不知道的錯誤,也許是 GTK 錯誤。對我來說,我只關心它是否有效。

編輯

Christopher 發現了一個實際的錯誤,blueman/plugins/mechanism/RfKill.py請根據此查看並更改您的文件,或者等到推送更新。第 15 行應該看起來像

f = open('/dev/rfkill', 'wb')只需添加 b

Lynob 回答的小更新:我遇到了同樣的問題,發現blueman-applet至少在 v. 1.99 中,有相同的錯誤,但有問題的程式碼位於/usr/lib/python2.7/dist-packages/blueman/main/KillSwitchNG.py.

第 87-88 行:

標誌 |= os.O_NONBLOCK

self.fd = os.open("/dev/rfkill", flags)

要修復問題binary mode位,還必須通過在呼叫flags之前添加此行來設置open(...)

標誌 |= os.O_BINARY

引用自:https://unix.stackexchange.com/questions/209445