matryer / xbar-plugins

Plugin repository for xbar (the BitBar reboot)
https://xbarapp.com
2.45k stars 1.04k forks source link

RescueTime plugin error #64

Closed JaKXz closed 8 years ago

JaKXz commented 8 years ago
$ /Users/Jason/git/bitbar-plugins/Enabled/rescuetime.1h.py
Traceback (most recent call last):
  File "/Users/Jason/git/bitbar-plugins/Enabled/rescuetime.1h.py", line 26, in <module>
    result = requests.get('https://www.rescuetime.com/anapi/data', params={
NameError: name 'requests' is not defined

I commented out the "Testing hack", but now I actually need to import requests from somewhere.

I've set up the API_KEY file and also enabled the plugin (it's in my Enabled/ folder with modifications), but https://github.com/matryer/bitbar-plugins/blob/master/Dev/RescueTime/rescuetime.1h.py#L26 requires requests to be defined, so I'm not really sure where to go from here...

kfdm commented 8 years ago

Sorry for not seeing this earlier. I actually fixed things later to use only built in functions so if you pull a new version it should work fine. https://github.com/matryer/bitbar-plugins/commit/df2611d07e1c4ece26784136bfe9230fff2c8ab7 https://github.com/matryer/bitbar-plugins/pull/73

JaKXz commented 8 years ago

Thanks @kfdm!