Open k3v1nM01n0 opened 5 years ago
can you post a more descriptive error message i.e the entire error log from your terminal it will tell me which file and line of code is causing the error above, else am just blind debugging,
though i think this is the issue
on line 7 in requests.py
you are reading the api_key
#request.py line 7
api_key = app.config['MOVIE_API_KEY']
yet in config.py
theres no such variable MOVIE_API_KEY
#config.py
class Config:
MOVIE_API_BASE_URL ='https://api.themoviedb.org/3/movie/550?api_key={}'
...
$ export MOVIE_API_KEY="your api key"
os.environ
to load it into the code
import os
#config.py
class Config:
MOVIE_API_BASE_URL ='https://api.themoviedb.org/3/movie/550?api_key={}'
MOVIE_API_KEY=os.environ.get("MOVIE_API_KEY","")
urllib.error.HTTPError: HTTP Error 401: Unauthorized