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

Problem in Container #10

Open
matheusfterra opened this issue Jun 5, 2023 · 2 comments
Open

Problem in Container #10

matheusfterra opened this issue Jun 5, 2023 · 2 comments

Comments

@matheusfterra
Copy link

Hi, I'm using a Docker Container, and have this issue, someone can help me please?

image

@insurgencless
Copy link

use chatgtp only advice i can give i know nothing about backend code

@lonardonifabio
Copy link

lonardonifabio commented Jun 15, 2023

I've the same error and I cannot go ahead with my project ==> https://aihypernews.streamlit.app/

Moviepy - Building video video_finale.mp4.
MoviePy - Writing audio in video_finaleTEMP_MPY_wvf_snd.mp3
[2023-06-15 20:32:01.952298] MoviePy - Done.
[2023-06-15 20:32:01.947918] Moviepy - Writing video video_finale.mp4
[2023-06-15 20:32:06.786054] 2023-06-15 20:32:06.785 Uncaught app exception69]
Traceback (most recent call last):
File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/app/aihypernews/news.py", line 564, in
st.write("Posted on Tik Tok:", uploadVideo(session_id, file, title, tags, verbose=True))
File "/app/aihypernews/Tiktok_uploader.py", line 75, in uploadVideo
user_id = r.json()["data"]["user_id_str"]
KeyError: 'user_id_str

Can someone please support us? ChatGPT is not enough :)

ChatGPT answer is below:

The error you encountered is caused by a KeyError in your code. Specifically, the line user_id = r.json()["data"]["user_id_str"] is trying to access the value associated with the key 'user_id_str' in a dictionary, but that key does not exist in the dictionary.
To fix this error, you can take the following steps:
Make sure that the dictionary r.json() actually contains the key 'user_id_str'. You can print the dictionary or use debugging techniques to inspect its structure and confirm the presence of the key.
If the key 'user_id_str' is not present in the dictionary, you need to identify the correct key to access the user ID. This might require examining the structure of the response or referring to the documentation or source code of the library or API you are using.
Once you have identified the correct key, modify the code to access the user ID using the correct key. For example, if the key is 'user_id', you would change the line to user_id = r.json()["data"]["user_id"].
After making the necessary changes, rerun your code to see if the error is resolved.

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

3 participants