IMDBPy import issue
Hello Everyone;
I am a beginner and trying to make a simple project. I need to use IMDB database connection in this project so I made some research and find a library is called as IMDbPy and it's able to install in Pycharm too, but when I installed it and write "import imdb" I got below error messages, any idea?
Thanks in advance.
C:\Users\UserName\AppData\Local\Programs\Python\Python36-32\python.exe C:/Users/UserName/PickMovie/movie.py
Traceback (most recent call last):
File "C:/Users/UserName/PickMovie/movie.py", line 4, in <module>
import imdb
File "C:\Users\UserName\PycharmProjects\untitled4\imdb.py", line 40, in <module>
response = urllib.request.urlopen(url).read()
File "C:\Users\UserName\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\UserName\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "C:\Users\UserName\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Users\UserName\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 570, in error
return self._call_chain(*args)
File "C:\Users\UserName\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "C:\Users\UserName\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
Process finished with exit code 1
Please sign in to leave a comment.
Looks like you also have imdb.py in your project ("C:\Users\UserName\PycharmProjects\untitled4\imdb.py"), please rename it and check the problem again.