TikTokLive icon indicating copy to clipboard operation
TikTokLive copied to clipboard

TypeError: string indices must be integers, not 'str'

Open haphy opened this issue 1 year ago • 2 comments

Describe the bug

input not existed user, error msg is unreasonable

client.run() File "/tk/.venv/lib/python3.11/site-packages/TikTokLive/client/client.py", line 200, in run return self._asyncio_loop.run_until_complete(self.connect(**kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/tk/.venv/lib/python3.11/site-packages/TikTokLive/client/client.py", line 176, in connect task: Task = await self.start(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tk/.venv/lib/python3.11/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 "/tk/.venv/lib/python3.11/site-packages/TikTokLive/client/web/routes/fetch_is_live.py", line 47, in call return (await self.fetch_is_live_room_ids(room_id))[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tk/.venv/lib/python3.11/site-packages/TikTokLive/client/web/routes/fetch_is_live.py", line 66, in fetch_is_live_room_ids return [i["alive"] for i in response_json["data"]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tk/.venv/lib/python3.11/site-packages/TikTokLive/client/web/routes/fetch_is_live.py", line 66, in return [i["alive"] for i in response_json["data"]] ~^^^^^^^^^ TypeError: string indices must be integers, not 'str'

Package Version v6.0.4

haphy avatar Apr 12 '24 03:04 haphy

Any solution for it?

EinGuterWaran avatar May 11 '24 13:05 EinGuterWaran

If you are being blocked, it might be time to consider a web_proxy. If this is an issue with the endpoint, copy it and debug. Submit a PR!

Thanks

isaackogan avatar Jun 26 '24 01:06 isaackogan

Same problem. Is there a solution? I'm a little confused about the answer above

sVor-LUA avatar Jul 09 '24 16:07 sVor-LUA

update to latest version and reopen if still occuring

isaackogan avatar Jul 09 '24 23:07 isaackogan