twitter-api-client
twitter-api-client copied to clipboard
1] AttributeError: 'NoneType' object has no attribute 'debug'
] Exception in thread Thread-2: [1] Traceback (most recent call last): [1] File "/usr/local/lib/python3.11/site-packages/twitter/search.py", line 105, in backoff [1] self.logger.warning(f'{YELLOW}{e.get("message")}{RESET}') [1] ^^^^^^^^^^^^^^^^^^^ [1] AttributeError: 'NoneType' object has no attribute 'warning' [1] [1] During handling of the above exception, another exception occurred: [1] [1] Traceback (most recent call last): [1] File "/usr/local/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1045, in _bootstrap_inner [1] self.run() [1] File "/Users/luijait/twitter_panel/api/index.py", line 112, in run [1] tweets = self.search.run( [1] ^^^^^^^^^^^^^^^^ [1] File "/usr/local/lib/python3.11/site-packages/twitter/search.py", line 48, in run [1] return asyncio.run(self.process(queries, limit, out, **kwargs)) [1] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] File "/usr/local/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run [1] return runner.run(main) [1] ^^^^^^^^^^^^^^^^ [1] File "/usr/local/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run [1] return self._loop.run_until_complete(task) [1] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete [1] File "/usr/local/lib/python3.11/site-packages/twitter/search.py", line 52, in process [1] return await asyncio.gather(*(self.paginate(s, q, limit, out, **kwargs) for q in queries)) [1] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] File "/usr/local/lib/python3.11/site-packages/twitter/search.py", line 72, in paginate [1] data, entries, cursor = await self.backoff(lambda: self.get(client, params), **kwargs) [1] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] File "/usr/local/lib/python3.11/site-packages/twitter/search.py", line 115, in backoff [1] self.logger.debug(f'Retrying in {f"{t:.2f}"} seconds\t\t{e}') [1] ^^^^^^^^^^^^^^^^^ [1] AttributeError: 'NoneType' object has no attribute 'debug'