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 #8

Closed
rhdgkr001 opened this issue Jun 1, 2021 · 1 comment
Closed

TypeError: string indices must be integers #8

rhdgkr001 opened this issue Jun 1, 2021 · 1 comment

Comments

@rhdgkr001
Copy link

rhdgkr001 commented Jun 1, 2021

I would like to inquire because the following error occurred when executing the 'getList(response)' function of main().

Traceback (most recent call last):
File "./main.py", line 49, in
main()
File "./main.py", line 40, in main
for stream in getList(response):
File "./hikload/util.py", line 114, in getList
url = i["ns0:mediaSegmentDescriptor"]["ns0:playbackURI"].replace("rtsp://", "rtsp://" + getConfig('user') + ":" + getConfig("password") + "@", 1)

TypeError: string indices must be integers

※ In the 112th line of util.py, insert print(i) as follows, and the result is 'ns0:sourceID'.

@Tedyst
Copy link
Owner

Tedyst commented Jun 1, 2021

Hey! I actually tried rewriting the whole project today to completely fix this issue and make it more maintainable. Can you check if the code that can be found in #9 does have this problem?

@Tedyst Tedyst closed this as completed Aug 19, 2021
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

2 participants