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

Error generating code #405

Open
seethun opened this issue Sep 15, 2024 · 5 comments
Open

Error generating code #405

seethun opened this issue Sep 15, 2024 · 5 comments

Comments

@seethun
Copy link

seethun commented Sep 15, 2024

I get an error when converting screenshot to code on self hosted application

Steps to reproduce the behavior:

  1. Self host this application per readme
  2. Upload image to convert to code.
  3. The application shows the error message - "Error generating code. Check the Developer Console AND the backend logs for details. Feel free to open a Github issue"
  4. I don't see any errors in the developer console. See below
screenshot-to-code/backend# sudo poetry run uvicorn main:app --reload --port 7001
INFO:     Will watch for changes in these directories: ['/home/admin/dev/devtools/screenshot-to-code/backend']
INFO:     Uvicorn running on http://127.0.0.1:7001 (Press CTRL+C to quit)
INFO:     Started reloader process [445283] using StatReload
INFO:     Started server process [445287]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
  1. I dont see log files. Let me know where thats located
@abi
Copy link
Owner

abi commented Sep 15, 2024

You're likely running into issues where the front-end is not connecting to the backend. Are they running on the same machine? What happens when you go to http://127.0.0.1:7001?

@3shimi
Copy link

3shimi commented Sep 26, 2024

i have same problem, when i go to http://127.0.0.1:7001, it says ERR_CONNECTION_REFUSED. Both front and back are on the same machine.

@3shimi
Copy link

3shimi commented Sep 26, 2024

not sure if it matters, it shows on my backend console: "TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'"

@abi
Copy link
Owner

abi commented Sep 26, 2024

@3shimi can you share the logs from both front-end and back-end running?

@a491004300
Copy link

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 sequence '\d'
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 sequence '\d'
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 sequence '\d'
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)

yarn run v1.22.22
$ vite --host 0.0.0.0

VITE v4.5.0 ready in 326 ms

➜ Local: http://localhost:5173/
➜ Network: http://172.23.0.3:5173/

ERROR
[TypeScript] Found 0 errors. Watching for file changes.

WARN Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme

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