leandcesar / themoviedb

A modern and easy to use API wrapper for The Movie Database (TMDb) API v3 written in Python.
https://pypi.org/project/themoviedb
MIT License
24 stars 7 forks source link

Pypi install not working #17

Closed jimlynnjulian closed 1 year ago

jimlynnjulian commented 1 year ago

Installed from Pypi onto Windows 11Pro x64 MD-DOS CLI. (After the MS-DOS CLI attempt, I tried installing form WSL Ubuntu and got: "Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-093q6bjq/aiohttp/" and "No module named 'tmdb'" when I tried to run the example script from the Pypi webpage.) I noticed the "Unclosed client session" and successfully accessed the db using a web browser. Tried script again, same result.

In MD-DOS CLI, I got this:

Microsoft Windows [Version 10.0.22621.1702] (c) Microsoft Corporation. All rights reserved.

C:\Users\jimly\Desktop\Movie databases\TMDb>python script01.py Traceback (most recent call last): File "C:\Users\jimly\Desktop\Movie databases\TMDb\script01.py", line 19, in asyncio.run(main()) File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete return future.result() File "C:\Users\jimly\Desktop\Movie databases\TMDb\script01.py", line 11, in main movies = await route.Movie().search("fight club") File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\site-packages\tmdb\route\movie.py", line 223, in search return await self.request( File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\site-packages\tmdb\route\base.py", line 97, in request response.raise_for_status() File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\client_reqrep.py", line 1005, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url=URL('https://api.themoviedb.org/3/search/movie?api_key=eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI0ZDZmZjhkNjUyMjIxNDE0ZWZkMDlkYjcwMjM1NTFlOCIsInN1YiI6IjYxOTQ2Y2Y2M2UwOWYzMDAyYzg2OTI4OSIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.TB31RQQ7O_wRcAThjNBNgwWjHy5-UQ3dMlOcXs46NgQ&language=en-US&region=US&watch_region=US&query=fight+club&page=1&include_adult=false') Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x000001FEB38FD7E0> Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x000001FEB38FD5D0> Fatal error on SSL transport protocol: <asyncio.sslproto.SSLProtocol object at 0x000001FEB38FE4D0> transport: <_ProactorSocketTransport fd=808 read=<_OverlappedFuture cancelled>> Traceback (most recent call last): File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\sslproto.py", line 684, in _process_write_backlog self._transport.write(chunk) File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 361, in write self._loop_writing(data=bytes(data)) File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 397, in _loop_writing self._write_fut = self._loop._proactor.send(self._sock, data) AttributeError: 'NoneType' object has no attribute 'send' Exception ignored in: <function _SSLProtocolTransport.del at 0x000001FEB2B68550> Traceback (most recent call last): File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\sslproto.py", line 321, in del File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\sslproto.py", line 316, in close File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\sslproto.py", line 593, in _start_shutdown File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\sslproto.py", line 598, in _write_appdata File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\sslproto.py", line 706, in _process_write_backlog File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\sslproto.py", line 720, in _fatal_error File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 151, in _force_close File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed RuntimeError: Event loop is closed Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x000001FEB387ABC0>, 10276.25)]'] connector: <aiohttp.connector.TCPConnector object at 0x000001FEB38FE6E0>

leandcesar commented 1 year ago

Please try now with the themoviedb==0.4.0 version.

jimlynnjulian commented 1 year ago

Hello, Installed the latest version with some success. I downloaded the source code and ran the exmple files (async and sync searches. The sync_search worked. Async worked up to a point. The results are below. The search term was 'Matrix.'

`A Glitch in the Matrix Are we in fact living in a simulation? This is the question postulated, wrestled with, and ultimately argued for through archival footage, compelling interviews with real people shrouded in digital avatars, and a collection of cases from some of our most iconoclastic figures in contemporary culture.

Exception ignored in: <function _ProactorBasePipeTransport.del at 0x00000192C0727BE0> Traceback (most recent call last): File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in del self.close() File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close self._loop.call_soon(self._call_connection_lost, None) File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon self._check_closed() File "C:\Users\jimly\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed`

jimlynnjulian commented 1 year ago

I also got this when making the install:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. eslite-movie 1.0.2 requires beautifulsoup4==4.6.3, but you have beautifulsoup4 4.12.2 which is incompatible. eslite-movie 1.0.2 requires requests==2.22.0, but you have requests 2.31.0 which is incompatible. ezapi-tmdb 0.8.2 requires requests==2.28.2, but you have requests 2.31.0 which is incompatible. imdbpie 5.6.4 requires attrs<19.0.0,>=18.1.0, but you have attrs 23.1.0 which is incompatible. json2xml 3.21.0 requires urllib3==1.26.13, but you have urllib3 2.0.3 which is incompatible. twine 4.0.2 requires rich>=12.0.0, but you have rich 9.5.1 which is incompatible.

jimlynnjulian commented 1 year ago

A working sync.py is close enugh.