我正在运行Ubuntu 16.04.6已安装。
我向它添加了ppa:screenlets/ppa并安装了screenlets-pack-all包。
然后我启动了screenlets管理器,并将GoogleCalendarScreenlet 0.4.16++添加到我的桌面上。

已经在选项gCal→→Google帐户中设置了凭据。
它显示登录成功的通知:

但是它没有显示我的日历中的事件。
为什么?是只有我吗,还是根本不起作用?
是否存在工作桌面(小部件)?
一些日志如下:
$ screenlets
/usr/lib/python2.7/dist-packages/screenlets/backend.py:166: Warning: Source ID 2251 was not found when attempting to remove it
gobject.source_remove(self.__timeout)
Traceback (most recent call last):
File "/usr/share/screenlets/screenlets-pack-all/GoogleCalendar/GoogleCalendarScreenlet.py", line 133, in __deal_with_data
all_calendars_feed = self.screenlet.cal_client.GetAllCalendarsFeed()
File "/usr/lib/python2.7/dist-packages/gdata/calendar/service.py", line 81, in GetAllCalendarsFeed
return self.Get(uri, converter=gdata.calendar.CalendarListFeedFromString)
File "/usr/lib/python2.7/dist-packages/gdata/service.py", line 1107, in Get
'reason': server_response.reason, 'body': result_body}
RequestError: {'status': 403, 'body': '\n\nForbidden\n\n\nForbidden\nError 403\n\n\n', 'reason': 'Forbidden'}
$ tail -f ~/.config/screenlets/GoogleCalendarScreenlet.log
Running update
Checking the Internet connection
Fetching events in calendars from: 2019-05-15T00:00:00+03:00 to 2019-06-05T23:59:59+03:00.
END RETRIEVE
Update failed for some unknown reason.(我看到上面禁止的词,所以可能是API更改问题)
发布于 2019-05-16 21:26:15
TL;DR -这是不可能的,因为谷歌禁用了ClientLogin,并要求应用程序开发人员使用OAuth 2.0。
详情如下。GoogleCalendarScreenlet是基于python-gdata图书馆的。这个库有专门的Google日历演示程序(它可以从python-gdata-doc包安装)。它可以用/usr/share/doc/python-gdata-doc/examples/calendar/calendarExample.py --user [username] --pw [password]启动
当我启动示例程序时,我得到以下输出:
Traceback (most recent call last):
File "/usr/share/doc/python-gdata-doc/examples/calendar/calendarExample.py", line 617, in
main()
File "/usr/share/doc/python-gdata-doc/examples/calendar/calendarExample.py", line 613, in main
sample = CalendarExample(user, pw)
File "/usr/share/doc/python-gdata-doc/examples/calendar/calendarExample.py", line 51, in __init__
self.cal_client.ClientLogin(email, password, self.cal_client.source);
File "/usr/lib/python2.7/dist-packages/gdata/client.py", line 441, in client_login
captcha_token=captcha_token, captcha_response=captcha_response)
File "/usr/lib/python2.7/dist-packages/gdata/client.py", line 373, in request_client_login_token
response, ClientLoginFailed, response_body)
gdata.client.ClientLoginFailed: Server responded to ClientLogin request: 404, https://developers.google.com/accounts/docs/AuthForInstalledApps访问https://developers.google.com/accounts/docs/AuthForInstalledApps页面提供了一个有趣的引用:
重要: ClientLogin自2012年4月20日起就被正式否决,现在不再可用了。对ClientLogin的请求将在HTTP404响应中失败。我们鼓励您尽快迁移到OAuth 2.0。
因此,这确实是python-gdata库的一个“问题”,而不是GoogleCalendarScreenlet本身。
替代办法:
indicator-datetime。https://askubuntu.com/questions/1143493
复制相似问题