screenshot-to-code
screenshot-to-code copied to clipboard
Error generating code. Check the Developer Console AND the backend logs for details. Feel free to open a Github issue.
Error generating code. Check the Developer Console AND the backend logs for details. Feel free to open a Github issue. i am getting this error while running the code from docker
Please post your docker logs
The same issue, I didn't use docker, and I cannot find the backend logs in the backend directory. Don't know why
poetry run uvicorn main:app --reload --port 7001
INFO: Will watch for changes in these directories: ['/Users/daweijiang/Desktop/screenshot-to-code/backend']
INFO: Uvicorn running on http://127.0.0.1:7001 (Press CTRL+C to quit)
INFO: Started reloader process [32625] using StatReload
Process SpawnProcess-1:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/Users/daweijiang/Library/Caches/pypoetry/virtualenvs/backend-PZ3Tvq_3-py3.11/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "/Users/daweijiang/Library/Caches/pypoetry/virtualenvs/backend-PZ3Tvq_3-py3.11/lib/python3.11/site-packages/uvicorn/server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/daweijiang/Library/Caches/pypoetry/virtualenvs/backend-PZ3Tvq_3-py3.11/lib/python3.11/site-packages/uvicorn/server.py", line 68, in serve
config.load()
File "/Users/daweijiang/Library/Caches/pypoetry/virtualenvs/backend-PZ3Tvq_3-py3.11/lib/python3.11/site-packages/uvicorn/config.py", line 467, in load
self.loaded_app = import_from_string(self.app)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/daweijiang/Library/Caches/pypoetry/virtualenvs/backend-PZ3Tvq_3-py3.11/lib/python3.11/site-packages/uvicorn/importer.py", line 24, in import_from_string
raise exc from None
File "/Users/daweijiang/Library/Caches/pypoetry/virtualenvs/backend-PZ3Tvq_3-py3.11/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
Hope these above can help you to know the reason
Did you do poetry install and then, poetry shell? Looks like you don't have the dotenv module installed.
I'm try the website and build it on docker ,, and i',m still stuck in this proplem ...
I did, but I still met this issue.
On Thu, 30 Nov 2023 at 12:50, Jadenyoky @.***> wrote:
I'm try the website and build it on docker ,, and i',m still stuck in this proplem ...
— Reply to this email directly, view it on GitHub https://github.com/abi/screenshot-to-code/issues/126#issuecomment-1832879817, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSFAPPT42SMEPG62MGE5UDYG7C5VAVCNFSM6AAAAAA77OYQISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZSHA3TSOBRG4 . You are receiving this because you commented.Message ID: @.***>
The above screenshot is after I did pip3 poetry install and poetry shell, met the same issue
@abi i am using this website https://screenshottocode.com/ even thought i am getting the same error {"Error generating code. Check the Developer Console AND the backend logs for details. Feel free to open a Github issue."} .do you think is there something wrong with my API key
a same problem
For the hosted version, we don't have great logging at the moment.
Please use the local version by downloading it
I've updated to the latest version, re-deployed it, and thought the problem was not configuring the base_url. But after setting the base_url, it still shows the error "Error generating code. Check the Developer Console AND the backend logs for details. Feel free to open a Github issue." It seems the problem is not with the base_url. I'm not sure where the problem lies.
There is docker logs:
the same Error generating code. Check the Developer Console AND the backend logs for details. Feel free to open a Github issue.
Change 7000 to 7001
I added a lot better logging. Can everyone please try again locally or use the hosted version (free with your own OpenAI key)?
The issue is still there. I am not using docker. Is it alright? I am also not having any logs in the console. Just having these two annoying notifications even after providing correct Open AI Key
@mritunjayagarwal what are you seeing in your backend logs?
no log is being displayed
Can you screenshot whatever logs you see and send it over?
I was having this issue as well, what you have to do is change the url in the .env in your frontend folder to match the uvicorn url you get when starting the server. Likely the same issue I had with .env having port 7001 but server running on 7000.
We had the unfortunate mistake of updating this repo to use 7001 when it started out using 7000. Did you pull the repo early and have since updated?
"Error generating code. Check theDeveloper Console AND the backendlogs for details. Feel free to open aGithub issue." Having the same issue, here are my docker logs
@Hellen20030926 can't see your Docker logs
看不到 Docker 日志 Due to the failure of the initial deployment, I have deleted the project with plans for re-deployment. Currently lacking an openAPI, I intend to employ a proxy. How should I go about modifying the settings?
There's a setting in the settings box to update the OpenAI URL