You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I clone your repo and get error when get city from old api https://ipapi.co/json
error:
python3 $HOME/polybar-collection/scripts/weather/main.py -u metric -a 61527dc595b1f41998133d77d4d7b106
Traceback (most recent call last):
File "/home/huy/polybar-collection/scripts/weather/main.py", line 120, in <module>
main()
File "/home/huy/polybar-collection/scripts/weather/main.py", line 106, in main
city = args.city[0] if args.city else get_city()
^^^^^^^^^^
File "/home/huy/polybar-collection/scripts/weather/main.py", line 17, in get_city
return r.json()["city"]
~~~~~~~~^^^^^^^^
KeyError: 'city'
I recomment you change to http://ip-api.com/json it also free too.
The text was updated successfully, but these errors were encountered:
Hmm, the API is working here, so not sure what the problem is. I probably forgot to add an exception from when you have connection problems or something. But it would be pretty easy to change the API just in case it's not working yet for you. Anyway thanks for reporting.
I clone your repo and get error when get city from old api
https://ipapi.co/json
error:
I recomment you change to
http://ip-api.com/json
it also free too.The text was updated successfully, but these errors were encountered: