screenshot-to-code icon indicating copy to clipboard operation
screenshot-to-code copied to clipboard

Error generating code. Check the Developer Console AND the backend logs for details.

Open blicme opened this issue 2 years ago • 15 comments

my api-key is openAI-hk,4.0, .env,llm.py are following image

屏幕截图 2024-01-19 150126 屏幕截图 2024-01-19 145037

blicme avatar Jan 19 '24 07:01 blicme

Yes i have the same issue.

silasmariusz avatar Jan 22 '24 14:01 silasmariusz

I Also get same error, Any Solution found ?

sgr2579 avatar Feb 26 '24 15:02 sgr2579

@sgr2579 what do your logs say?

abi avatar Feb 26 '24 15:02 abi

@sgr2579 what do your logs say? Screenshot 2024-02-26 at 8 58 32 PM

sgr2579 avatar Feb 26 '24 15:02 sgr2579

your backend logs will be helpful

abi avatar Feb 26 '24 15:02 abi

how to get that ?

your backend logs will be helpful

sgr2579 avatar Feb 26 '24 15:02 sgr2579

From which ever terminal you're running your backend in

abi avatar Feb 26 '24 15:02 abi

image I hope so this is you are asking

From which ever terminal you're running your backend in

sgr2579 avatar Feb 26 '24 15:02 sgr2579

hey @sgr2579 this doesn't look like screenshot-to-code backend logs.

abi avatar Feb 27 '24 01:02 abi

I'm not sure this will help. But based on what I see, this issue may be related to port setting.

  1. Check your backend port number. the port number should be 7001. (Because frontend is trying to connect 7001 port.)
  2. Check whether other processes are using port 7001.

cuziam avatar Mar 06 '24 03:03 cuziam

Hi my backend log is: Caches/pypoetry/virtualenvs/backend-FuQBPevx-py3.11/lib/python3.11/site-packages/openai/_base_client.py", line 1504, in _request raise APIConnectionError(request=request) from err openai.APIConnectionError: Connection error. INFO: connection closed

pluto-tu avatar Mar 17 '24 15:03 pluto-tu

I also have this kind of issue, and my backend logs is like this:

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) INFO: Shutting down INFO: Waiting for application shutdown. INFO: Application shutdown complete. INFO: Finished server process [1] Skipping virtualenv creation, as specified in config file. 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: 10.125.155.0:61458 - "GET / HTTP/1.1" 200 OK INFO: 10.125.155.0:61458 - "GET /favicon.ico HTTP/1.1" 404 Not Found

Peter-Hamster avatar Mar 18 '24 03:03 Peter-Hamster

@Peter-Hamster there doesn't seem to be an error in those logs. When you load your front-end, does that work? Are you running both backend and front-end on your local machine or on a remote machine?

abi avatar Mar 18 '24 16:03 abi

Is your problem solved, I'm getting the same error

wshwhyu avatar Apr 16 '24 09:04 wshwhyu

I changed the ip address from 127.0.0.1 to the public address of the machine running the backend container. And it works.

On Tue, Apr 16, 2024 at 5:42 PM wshwhyu @.***> wrote:

Is your problem solved, I'm getting the same error

— Reply to this email directly, view it on GitHub https://github.com/abi/screenshot-to-code/issues/218#issuecomment-2058675327, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7RA7XPY7RP64KLHRID2STY5TXBDAVCNFSM6AAAAABCBPDJZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYGY3TKMZSG4 . You are receiving this because you commented.Message ID: @.***>

-- Hongxian Sun, M. Phil. CELL: (+86) 19951550768

albertshx avatar Apr 19 '24 05:04 albertshx

Closing due to inactivity

abi avatar May 23 '24 20:05 abi