大家好,我正在运行 Ubuntu 13.04,一切正常,除了当我尝试gnome-shell-google-calendar
按照这指导。
它可以工作,但我的在线帐户无法被识别(尽管已经设置)。
Please choose the Account: None
You have entered an invalid account number. Please enter an integer.
Logging in as 'None'...
Error logging in as 'None'
'None' may not be a GNOME online account. A list of existing accounts is below.
If you do not see a list of accounts, then you first need to add one.
For more information, see http://library.gnome.org/users/gnome-help/stable/accounts.html
Please choose the Account:
那是什么原因呢?
答案1
我也遇到了同样的问题,我猜这是与 Ubuntu 13.04 相关的错误。我使用在线帐户的其他应用程序也停止工作了。
手动启动脚本时,会抛出以下堆栈跟踪:
Logging in as '[email protected]'...
Error logging in as '[email protected]'
'[email protected]' may not be a GNOME online account. A list of existing accounts is below.
If you do not see a list of accounts, then you first need to add one.
For more information, see http://library.gnome.org/users/gnome-help/stable/accounts.html
Traceback (most recent call last):
File "./gnome-shell-google-calendar.py", line 477, in <module>
account = oauth.oauth_prompt()
File "/home/tnaessens/gnome-shell-google-calendar/oauth.py", line 13, in oauth_prompt
'/org/gnome/OnlineAccounts')
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.OnlineAccounts was not provided by any .service files
当我查看 dbus-1/services 目录时,没有 org.gnome.OnlineAccounts。
解决方案:我通过下载gnome-online-accounts
并重新启动 .py 文件解决了这个问题。它要求输入我的账户,我输入后它立即开始同步。
答案2
是的,我为遇到同样问题的人找到了解决方案:
在终端运行:
env XDG_CURRENT_DESKTOP=GNOME gnome-control-center
然后应该有 2 个在线账户设置;
如果你将 google-online 帐户添加到第二个帐户(看起来像插头的帐户),脚本就会识别该 google 帐户