Closed miwi-fbsd closed 5 years ago
Save credentials.json
as ~/.config/py3status/google_calendar.client_secret
. I can see some confusions there though.
Thanks that worked. Now it shows u2687, failed (IndexError) line 506
I just got home late night at 1:05am. I need more information than that. Sorry.
hey @miwi-fbsd
Line 506 looks like you are trying to right click on an event is that so?
If so, that means that you get something shown on the bar and it's a click related problem right?
@ultrabug correct, thing is it shows only u2687 (no clue what that even means) nothing else, when i click around it takes also a bit to popup the click event. See screenshot
Py3status might be running with Python2. In Python3, it should render this icon.
You can switch to Python3 or to specify same/different format (i.e.)
order += "google_calendar"
google_calendar {
# format = '{events}|\?color=event \u2687'
# format = '{events}|\?color=event ⚇'
}
For Line 605, if you can log this with py3status -c ~/py3status.conf -l /tmp/py3status.log
. It should print some things. IndexError seems like button_index
might tried to open empty urls
list.
diff --git a/py3status/modules/google_calendar.py b/py3status/modules/google_calendar.py
index b9b8c59..f654c37 100644
--- a/py3status/modules/google_calendar.py
+++ b/py3status/modules/google_calendar.py
@@ -502,6 +502,10 @@ class Py3status:
self.button_states[button_index] = \
not self.button_states[button_index]
elif button == self.button_open:
+ self.py3.log('====================')
+ self.py3.log('URLS: {}'.format(self.event_urls))
+ self.py3.log('INDEX: {}'.format(button_index))
+ self.py3.log('====================')
self.py3.command_run('xdg-open ' + self.event_urls[
button_index])
self.py3.prevent_refresh()
``
@lasers thank you switching to python3 fixed the icon issue (wasnt aware of that)
for the log:
2018-12-28 23:53:55 INFO trying to dispatch event to module "google_calendar"
2018-12-28 23:53:55 INFO Module google_calendar
: ====================
2018-12-28 23:53:55 INFO Module google_calendar
: URLS: []
2018-12-28 23:53:55 INFO Module google_calendar
: INDEX: 0
2018-12-28 23:53:55 INFO Module google_calendar
: ====================
2018-12-28 23:53:55 WARNING on_click event in google_calendar
failed (IndexError) google_calendar.py line 510.
2018-12-28 23:53:55 INFO Traceback
IndexError: list index out of range
File "/usr/local/lib/python3.6/site-packages/py3status/module.py", line 754, in click_event
click_method(event)
File "/usr/local/lib/python3.6/site-packages/py3status/modules/google_calendar.py", line 510, in on_click
button_index])
2018-12-28 23:53:55 ERROR on_click event in google_calendar
failed (IndexError) google_calendar.py line 510. Please try to fix this and reload i3wm (Mod+Shift+R)
Closed via #1603. :clinking_glasses:
Hi,
How is this plugin now working? According to the docu following steps are needed:
the downloaded file calles now credentials.json how to get this to work now?
Thanks