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

User Error generating code. Check the Developer Console AND the backend logs for details. Feel free to open a Github issue. #292

Open
summerainX opened this issue Apr 1, 2024 · 15 comments

Comments

@summerainX
Copy link

i use docker to run this project
but it error when I upload picture ,it prompt that:
User Error generating code. Check the Developer Console AND the backend logs for details. Feel free to open a Github issue.
i check web console:
图片

and my backend seem no any logs got
Skipping virtualenv creation, as specified in config file.
/usr/local/lib/python3.12/site-packages/moviepy/config_defaults.py:1: SyntaxWarning: invalid escape sequence '\P'
"""
/usr/local/lib/python3.12/site-packages/moviepy/video/io/ffmpeg_reader.py:294: SyntaxWarning: invalid escape sequ
lines_video = [l for l in lines if ' Video: ' in l and re.search('\d+x\d+', l)]
/usr/local/lib/python3.12/site-packages/moviepy/video/io/ffmpeg_reader.py:367: SyntaxWarning: invalid escape sequ
rotation_lines = [l for l in lines if 'rotate :' in l and re.search('\d+$', l)]
/usr/local/lib/python3.12/site-packages/moviepy/video/io/ffmpeg_reader.py:370: SyntaxWarning: invalid escape sequ
match = re.search('\d+$', rotation_line)
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:7001 (Press CTRL+C to quit)
INFO: 198.235.24.103:62166 - "GET / HTTP/1.1" 200 OK
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
INFO: 34.68.34.84:46093 - "GET / HTTP/1.1" 200 OK
INFO: 34.68.34.84:46093 - "GET /index.html HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /doesntexist-123 HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /bonita/login.jsp HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /admin HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /version HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /login HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /assets/favicon.png HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /ui/favicon.ico HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /login.html HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /static/images/favicon.ico HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /install HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /phpmyadmin/index.php HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /error.json HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /api HTTP/1.1" 404 Not Found
INFO: 34.68.34.84:46093 - "GET /admin HTTP/1.1" 404 Not Found
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.
WARNING: Invalid HTTP request received.

it seems that i should change some config to redirect my backend address?
i install program in linux。 and open it in my mac。

@abi
Copy link
Owner

abi commented Apr 1, 2024

Can you try https://github.com/abi/screenshot-to-code?tab=readme-ov-file#%EF%B8%8F-faqs How can I update the backend host that my front-end connects to?

I think the issue might be that your backend is not running at 127.0.0.1

Can you try visiting 127.0.0.1:7000 as well? What do you see?

@qiangminmama
Copy link

/usr/local/lib/python3.12/site-packages/moviepy/video/io/ffmpeg_reader.py:294: SyntaxWarning: invalid escape sequ
lines_video = [l for l in lines if ' Video: ' in l and re.search('\d+x\d+', l)]
may not see this log

I meet the same error, may be is not suitable of lib moviepy,just guess ,thank you sir,Looking forward to your reply

@abi
Copy link
Owner

abi commented Apr 2, 2024

@qiangminmama have you tried the two things I suggested?

@summerainX
Copy link
Author

i see my docker ps seem backend port is 7001
图片
but i try your suggest,7000 and 7001 both have response like underline:
图片
should I try to change fronted/.env.example and restart my docker?
(ps: my dir dont have .env.local should I create one instead of .env.example?)
图片
by the way, i see the example you provide is the public ip,should I use public ip instead of 127.0.0.1?
Looking forward to your reply~

@abi
Copy link
Owner

abi commented Apr 2, 2024

Yes, go to the backend URL in your browser. It should load a page successfully. If not you have the wrong ip or port.

@abi
Copy link
Owner

abi commented Apr 2, 2024

Your port looks to be 7001 from the logs but instead of using curl, use your web browser to go to that URL.

@summerainX
Copy link
Author

i try your suggest but get the same response
图片
is it means I have a true conf?
w h at can I do to solve this problem?
Looking forward to your reply~

@abi
Copy link
Owner

abi commented Apr 3, 2024

So your backend is working correctly.

Just set the correct URL and it should work: Can you try https://github.com/abi/screenshot-to-code?tab=readme-ov-file#%EF%B8%8F-faqs How can I update the backend host that my front-end connects to?

@xiaosaturn
Copy link

link websocket error
image
http ok
image

How solve websocket error?

@abi
Copy link
Owner

abi commented Apr 7, 2024

So at 10.0.... in your browser displays that web page?

@xiaosaturn
Copy link

10.0... is private ip

@abi
Copy link
Owner

abi commented Apr 8, 2024

Yes. So if that is working in the browser. The front end should be able to connect to it. Do you see any logs on the backend?

@xiaosaturn
Copy link

Where is logs. I use docker run this project

@xiaosaturn
Copy link

image
It seems like good, I don't know where is problem?

@abi
Copy link
Owner

abi commented Apr 8, 2024

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