AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1143493
Accepted
N0rbert
N0rbert
Asked: 2019-05-16 07:06:15 +0800 CST2019-05-16 07:06:15 +0800 CST 2019-05-16 07:06:15 +0800 CST

如何让 GoogleCalendarScreenlet 显示 Google 日历?

  • 772

我正在运行已安装的 Ubuntu MATE 16.04.6。

我已经添加ppa:screenlets/ppa到它并安装了screenlets-pack-all包。

然后我启动了screenlets管理器并将 GoogleCalendarScreenlet 0.4.16++ 添加到我的桌面

没有凭据

已在Options → gCal essential → Google account中设置了凭据。

它显示登录成功的通知:

但它不显示我的 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': '<HTML>\n<HEAD>\n<TITLE>Forbidden</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Forbidden</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\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.

(我在上面看到了Forbidden这个词,所以可能是 API 更改问题)

google-calendar calendar 16.04 mate screenlets
  • 1 1 个回答
  • 657 Views

1 个回答

  • Voted
  1. Best Answer
    N0rbert
    2019-05-17T13:26:15+08:002019-05-17T13:26:15+08:00

    TL;DR - 这是不可能的,因为 Google 禁用了 ClientLogin 并要求应用程序开发人员改用 OAuth 2.0。


    详情如下。
    GoogleCalendarScreenlet 基于python-gdatalibrary。
    这个库有特殊的谷歌日历演示程序(它可以从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 <module>
        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页面给出了一个有趣的引用:

    重要提示:自 2012 年 4 月 20 日起,ClientLogin 已正式弃用,现在不再可用。对 ClientLogin 的请求将失败并返回 HTTP 404 响应。我们鼓励您尽快迁移到 OAuth 2.0。

    所以实际上这是python-gdata图书馆的“问题”,而不是 GoogleCalendarScreenlet 本身。


    备择方案:

    • 对于 Ubuntu 16.04 LTS - Rainlendar Pro(它使用 OAuth);
    • 适用于 Ubuntu 18.04 LTS -indicator-datetime带有 GNOME Evolution 或 GNOME 日历。
    • 0

相关问题

  • Thunderbird 和桌面日历

  • 是否有允许我访问谷歌日历的 KOrganizer 插件?

  • 我需要做什么才能在雷鸟上访问谷歌日历?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve