Closed ohkeenan closed 6 years ago
Issue resolved in 3.4.10 https://github.com/cgrok/clashroyale/commit/bbc5fdfacb45e67db866a08256ed6e15b9a31ee5
Still not clean for me maybe I'm doing something wrong
sync.py is giving this:
Traceback (most recent call last): File "examples/sync.py", line 31, in <module> profile.refresh() File "/usr/lib/python3.6/site-packages/clashroyale/models.py", line 137, in refresh data, cached, ts = self.client.request(self.url, refresh=True) TypeError: request() missing 1 required positional argument: 'timeout'
and async.py:
Traceback (most recent call last): File "examples/async.py", line 32, in <module> loop.run_until_complete(main()) File "/usr/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete return future.result() File "examples/async.py", line 16, in main await profile.refresh() File "/usr/lib/python3.6/site-packages/clashroyale/models.py", line 141, in _arefresh data, cached, ts = await self.client.request(self.url, refresh=True) TypeError: request() missing 1 required positional argument: 'timeout' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7f72db7c76d8> Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f72de1eada0>, 1321220.18729525)]'] connector: <aiohttp.connector.TCPConnector object at 0x7f72da610400>
➜ pip3.6 list |grep clashroyale
clashroyale 3.4.10
➜ git rev-parse --short HEAD
bbc5fdf
They do run through though
Will look into it.
Issue resolved. Not live yet.
Issue was related to BaseAttrDict.refresh()
Resolved in 3.4.11 (the breaking update)
Examples are re-done in 3.5.0
python3.5 examples/async.py / sync.py / etc. Still runs but returns:
Traceback (most recent call last): File "async.py", line 32, in <module> loop.run_until_complete(main()) File "/usr/lib64/python3.5/asyncio/base_events.py", line 467, in run_until_complete return future.result() File "/usr/lib64/python3.5/asyncio/futures.py", line 294, in result raise self._exception File "/usr/lib64/python3.5/asyncio/tasks.py", line 240, in _step result = coro.send(None) File "async.py", line 16, in main await profile.refresh() File "/usr/lib/python3.5/site-packages/clashroyale/models.py", line 141, in _arefresh data, cached, ts = await self.client.request(self.url, refresh=True) TypeError: request() missing 1 required positional argument: 'timeout' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7f677eb19eb8> Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f676fe42f60>, 144031.235123359)]'] connector: <aiohttp.connector.TCPConnector object at 0x7f6772f005c0>
Sorry if this is expected