benjamin-sommer / BitBar-Scripts

A variety of scripts for BitBar, a menu bar customisation tool for Mac
0 stars 0 forks source link

coronavirus.py won't activate #1

Open MatYRicS opened 4 years ago

MatYRicS commented 4 years ago

I have requests installed but BitBar keeps telling me that I need to install the module.

I'm using pyenv with Python 3.8.0 and Pip version 20.0.2

$ pip list
Package     Version
----------- ----------
requests    2.23.0

The script is working from the terminal:

$ python coronavirus.py
Smittede: 1057 (↑8%)  Doede: 4 (↑0%) | image=...
benjamin-sommer commented 4 years ago

Is requests installed globally?

MatYRicS commented 4 years ago

Is requests installed globally?

Yes.

$ sudo -H pip list
Package    Version
---------- ----------
certifi    2019.11.28
chardet    3.0.4
httpie     2.0.0
idna       2.9
pip        20.0.2
Pygments   2.5.2
requests   2.23.0
setuptools 41.2.0
urllib3    1.25.8
benjamin-sommer commented 4 years ago

When you go to BitBar in the menu, are you getting the error once you click on the warning symbol?

MatYRicS commented 4 years ago

screenshot

benjamin-sommer commented 4 years ago

Can you try installing it with pip3 instead of pip?

MatYRicS commented 4 years ago

Can you try installing it with pip3 instead of pip?

$ sudo -H pip3 list
Package    Version
---------- ----------
certifi    2019.11.28
chardet    3.0.4
httpie     2.0.0
idna       2.9
pip        20.0.2
Pygments   2.5.2
requests   2.23.0
setuptools 41.2.0
urllib3    1.25.8
benjamin-sommer commented 4 years ago

Maybe sudo easy_install -U requests?

benjamin-sommer commented 4 years ago

Did that work?

MatYRicS commented 4 years ago

Did that work?

No :(

MatYRicS commented 4 years ago

If I try and run the script with the full path it dosen't work: /Users/bigmac/Library/Mobile\ Documents/com~apple~CloudDocs/Dev/BitBar\ plugins/coronavirus.py

Seems like bitbar is running the script like that^

benjamin-sommer commented 4 years ago

Do you get the same error?

benjamin-sommer commented 4 years ago

If so, try uninstalling and re-installing requests.

benjamin-sommer commented 4 years ago

Any update on this?