Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
haphy opened this issue Apr 12, 2024 · 3 comments
Open

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

haphy opened this issue Apr 12, 2024 · 3 comments
Assignees

Comments

@haphy
Copy link

haphy commented Apr 12, 2024

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

@EinGuterWaran
Copy link

Any solution for it?

@isaackogan
Copy link
Owner

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

@sVor-LUA
Copy link

sVor-LUA commented Jul 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants