amosbastian / football

A Python wrapper around the football-data API.
GNU Affero General Public License v3.0
7 stars 3 forks source link

KeyError: 'FOOTBALL_API_KEY' #9

Open zurgeg opened 5 years ago

zurgeg commented 5 years ago

I try to run the following


import requests
from football import Football
football = Football("myapi")

manchester_united = football.team("Baltimore Ravens")
print(manchester_united)

and get this

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/football/football.py", line 38, in __init__
    self.headers = headers()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/football/utils.py", line 5, in headers
    api_key = os.environ["FOOTBALL_API_KEY"]
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/os.py", line 678, in __getitem__
    raise KeyError(key) from None
KeyError: 'FOOTBALL_API_KEY'

Any help is appreciated

amosbastian commented 5 years ago

I'm not really maintaining this package anymore, and I think the https://www.football-data.org/ has completely changed since I created it, and thus everything is broken. Sorry!