k3v1nM01n0 / Flask

0 stars 0 forks source link

urllib error #3

Open k3v1nM01n0 opened 5 years ago

k3v1nM01n0 commented 5 years ago

urllib.error.HTTPError: HTTP Error 401: Unauthorized

jakhax commented 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,

jakhax commented 5 years ago

Bug description

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={}'
...

solution