isaackogan / TikTokLive

Python library to receive live stream events (comments, gifts, etc.) in realtime from TikTok LIVE.
https://isaackogan.github.io/TikTokLive/
MIT License
858 stars 173 forks source link

i can't connect in a live #246

Closed metalalchemist closed 1 month ago

metalalchemist commented 1 month ago

Describe the bug

i am using python 3.12 when i tried to connect in a live with any link i have an error. https://www.tiktok.com/@vecinaguera/live File "C:\Users\cesit\AppData\Local\Programs\Python\Python312\Lib\site-packages\TikTokLive\client\client.py", line 200, in run return self._asyncio_loop.run_until_complete(self.connect(kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\cesit\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 687, in run_until_compl ete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\cesit\AppData\Local\Programs\Python\Python312\Lib\site-packages\TikTokLive\client\client.py", line 176, in connect task: Task = await self.start(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\cesit\AppData\Local\Programs\Python\Python312\Lib\site-packages\TikTokLive\client\client.py", line 127, in start if fetch_live_check and not await self._web.fetch_is_live(room_id=self._room_id): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\cesit\AppData\Local\Programs\Python\Python312\Lib\site-packages\TikTokLive\client\web\routes\fetch_is_l ive.py", line 47, in call return (await self.fetch_is_live_room_ids(room_id))[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\cesit\AppData\Local\Programs\Python\Python312\Lib\site-packages\TikTokLive\client\web\routes\fetch_is_l ive.py", line 66, in fetch_is_live_room_ids return [i["alive"] for i in response_json["data"]] ~^^^^^^^^^ TypeError: string indices must be integers, not 'str'

Expected Behaviour

loading live and then connect to read the chat ...

Actual Behaviour

the client can't connect to the room ...

Package Version

My version of TikTokLive is 6.0.8.

Operating System

ozbao commented 1 month ago

me too

metalalchemist commented 1 month ago

wath version of python do you use?

ozbao commented 1 month ago

wath version of python do you use? pyhton3.11.3 1722131615550

isaackogan commented 1 month ago

A more helpful error has been implemented in 6.0.9 releasing tonight.

If the room ID does not exist, this is the cause of the above error.