Danie1 / threads-api

Unofficial Python API for Meta's Threads App
https://pypi.org/project/threads-api/
MIT License
127 stars 16 forks source link

[BUG] login InstagrapiSession #47

Closed MsLolita closed 1 year ago

MsLolita commented 1 year ago

Some bug when handling login response with InstagrapiSession. [ERROR] list index out of range Traceback (most recent call last): File "D:\user\prog\threads_bot\v2\main.py", line 22, in asyncio.run(main()) File "C:\Users\Bou\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\Bou\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Bou\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "D:\user\prog\threads_bot\v2\main.py", line 18, in main await bot.start() File "D:\user\prog\threads_bot\v2\threads_manager\timeline_manager.py", line 34, in start await self.login(self.username, self.password, cached_token_path="data\.session") File "D:\user\prog\threads_bot\v2\venv\Lib\site-packages\threads_api\src\threads_api.py", line 257, in login token = self.instagrapi_client.private.headers['Authorization'].split("Bearer IGT:2:")[1]


IndexError: list index out of range

Process finished with exit code 1
Danie1 commented 1 year ago

I am fixing this at the moment. Thanks for reporting.

Danie1 commented 1 year ago

This is fixed in https://github.com/Danie1/threads-api/releases/tag/v1.1.12

Thanks for reporting @MsLolita

Please open a new issue if you encounter any additional problems.