abi / screenshot-to-code

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
https://screenshottocode.com
MIT License
61.57k stars 7.52k forks source link

backend unable to start #359

Closed DanielKong94 closed 5 months ago

DanielKong94 commented 5 months ago

Describe the bug 2024-06-12 12:56:21 Skipping virtualenv creation, as specified in config file. 2024-06-12 12:56:21 Traceback (most recent call last): 2024-06-12 12:56:21 File "/usr/local/bin/uvicorn", line 8, in 2024-06-12 12:56:21 sys.exit(main()) 2024-06-12 12:56:21 ^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1157, in call 2024-06-12 12:56:21 return self.main(args, kwargs) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1078, in main 2024-06-12 12:56:21 rv = self.invoke(ctx) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1434, in invoke 2024-06-12 12:56:21 return ctx.invoke(self.callback, ctx.params) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 783, in invoke 2024-06-12 12:56:21 return __callback(args, kwargs) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/uvicorn/main.py", line 416, in main 2024-06-12 12:56:21 run( 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/uvicorn/main.py", line 587, in run 2024-06-12 12:56:21 server.run() 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/uvicorn/server.py", line 61, in run 2024-06-12 12:56:21 return asyncio.run(self.serve(sockets=sockets)) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run 2024-06-12 12:56:21 return runner.run(main) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run 2024-06-12 12:56:21 return self._loop.run_until_complete(task) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete 2024-06-12 12:56:21 return future.result() 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/uvicorn/server.py", line 68, in serve 2024-06-12 12:56:21 config.load() 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/uvicorn/config.py", line 467, in load 2024-06-12 12:56:21 self.loaded_app = import_from_string(self.app) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/uvicorn/importer.py", line 21, in import_from_string 2024-06-12 12:56:21 module = importlib.import_module(module_str) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module 2024-06-12 12:56:21 return _bootstrap._gcd_import(name[level:], package, level) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "", line 1387, in _gcd_import 2024-06-12 12:56:21 File "", line 1360, in _find_and_load 2024-06-12 12:56:21 File "", line 1331, in _find_and_load_unlocked 2024-06-12 12:56:21 File "", line 935, in _load_unlocked 2024-06-12 12:56:21 File "", line 995, in exec_module 2024-06-12 12:56:21 File "", line 488, in _call_with_frames_removed 2024-06-12 12:56:21 File "/app/main.py", line 7, in 2024-06-12 12:56:21 from fastapi import FastAPI 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/fastapi/init.py", line 7, in 2024-06-12 12:56:21 from .applications import FastAPI as FastAPI 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/fastapi/applications.py", line 16, in 2024-06-12 12:56:21 from fastapi import routing 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 24, in 2024-06-12 12:56:21 from fastapi.dependencies.models import Dependant 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/fastapi/dependencies/models.py", line 3, in 2024-06-12 12:56:21 from fastapi.security.base import SecurityBase 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/fastapi/security/init.py", line 1, in 2024-06-12 12:56:21 from .api_key import APIKeyCookie as APIKeyCookie 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/fastapi/security/api_key.py", line 3, in 2024-06-12 12:56:21 from fastapi.openapi.models import APIKey, APIKeyIn 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/fastapi/openapi/models.py", line 103, in 2024-06-12 12:56:21 class Schema(BaseModel): 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 286, in new 2024-06-12 12:56:21 cls.try_update_forward_refs() 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 807, in try_update_forward_refs 2024-06-12 12:56:21 update_model_forward_refs(cls, cls.fields.values(), cls.config.json_encoders, localns, (NameError,)) 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/pydantic/typing.py", line 554, in update_model_forward_refs 2024-06-12 12:56:21 update_field_forward_refs(f, globalns=globalns, localns=localns) 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/pydantic/typing.py", line 520, in update_field_forwardrefs 2024-06-12 12:56:21 field.type = evaluateforwardref(field.type, globalns, localns or None) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 File "/usr/local/lib/python3.12/site-packages/pydantic/typing.py", line 66, in evaluateforwardref 2024-06-12 12:56:21 return cast(Any, type)._evaluate(globalns, localns, set()) 2024-06-12 12:56:21 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:56:21 TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard' 2024-06-12 12:57:10 Skipping virtualenv creation, as specified in config file. 2024-06-12 12:57:10 Traceback (most recent call last): 2024-06-12 12:57:10 File "/usr/local/bin/uvicorn", line 8, in 2024-06-12 12:57:10 sys.exit(main()) 2024-06-12 12:57:10 ^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1157, in call 2024-06-12 12:57:10 return self.main(args, kwargs) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1078, in main 2024-06-12 12:57:10 rv = self.invoke(ctx) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1434, in invoke 2024-06-12 12:57:10 return ctx.invoke(self.callback, ctx.params) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 783, in invoke 2024-06-12 12:57:10 return __callback(args, kwargs) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/uvicorn/main.py", line 416, in main 2024-06-12 12:57:10 run( 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/uvicorn/main.py", line 587, in run 2024-06-12 12:57:10 server.run() 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/uvicorn/server.py", line 61, in run 2024-06-12 12:57:10 return asyncio.run(self.serve(sockets=sockets)) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run 2024-06-12 12:57:10 return runner.run(main) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run 2024-06-12 12:57:10 return self._loop.run_until_complete(task) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete 2024-06-12 12:57:10 return future.result() 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/uvicorn/server.py", line 68, in serve 2024-06-12 12:57:10 config.load() 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/uvicorn/config.py", line 467, in load 2024-06-12 12:57:10 self.loaded_app = import_from_string(self.app) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/uvicorn/importer.py", line 21, in import_from_string 2024-06-12 12:57:10 module = importlib.import_module(module_str) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module 2024-06-12 12:57:10 return _bootstrap._gcd_import(name[level:], package, level) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "", line 1387, in _gcd_import 2024-06-12 12:57:10 File "", line 1360, in _find_and_load 2024-06-12 12:57:10 File "", line 1331, in _find_and_load_unlocked 2024-06-12 12:57:10 File "", line 935, in _load_unlocked 2024-06-12 12:57:10 File "", line 995, in exec_module 2024-06-12 12:57:10 File "", line 488, in _call_with_frames_removed 2024-06-12 12:57:10 File "/app/main.py", line 7, in 2024-06-12 12:57:10 from fastapi import FastAPI 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/fastapi/init.py", line 7, in 2024-06-12 12:57:10 from .applications import FastAPI as FastAPI 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/fastapi/applications.py", line 16, in 2024-06-12 12:57:10 from fastapi import routing 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 24, in 2024-06-12 12:57:10 from fastapi.dependencies.models import Dependant 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/fastapi/dependencies/models.py", line 3, in 2024-06-12 12:57:10 from fastapi.security.base import SecurityBase 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/fastapi/security/init.py", line 1, in 2024-06-12 12:57:10 from .api_key import APIKeyCookie as APIKeyCookie 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/fastapi/security/api_key.py", line 3, in 2024-06-12 12:57:10 from fastapi.openapi.models import APIKey, APIKeyIn 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/fastapi/openapi/models.py", line 103, in 2024-06-12 12:57:10 class Schema(BaseModel): 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 286, in new 2024-06-12 12:57:10 cls.try_update_forward_refs() 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 807, in try_update_forward_refs 2024-06-12 12:57:10 update_model_forward_refs(cls, cls.fields.values(), cls.config.json_encoders, localns, (NameError,)) 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/pydantic/typing.py", line 554, in update_model_forward_refs 2024-06-12 12:57:10 update_field_forward_refs(f, globalns=globalns, localns=localns) 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/pydantic/typing.py", line 520, in update_field_forwardrefs 2024-06-12 12:57:10 field.type = evaluateforwardref(field.type, globalns, localns or None) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 File "/usr/local/lib/python3.12/site-packages/pydantic/typing.py", line 66, in evaluateforwardref 2024-06-12 12:57:10 return cast(Any, type)._evaluate(globalns, localns, set()) 2024-06-12 12:57:10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:10 TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard' 2024-06-12 12:57:12 Skipping virtualenv creation, as specified in config file. 2024-06-12 12:57:12 Traceback (most recent call last): 2024-06-12 12:57:12 File "/usr/local/bin/uvicorn", line 8, in 2024-06-12 12:57:12 sys.exit(main()) 2024-06-12 12:57:12 ^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1157, in call 2024-06-12 12:57:12 return self.main(args, kwargs) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1078, in main 2024-06-12 12:57:12 rv = self.invoke(ctx) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1434, in invoke 2024-06-12 12:57:12 return ctx.invoke(self.callback, ctx.params) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/click/core.py", line 783, in invoke 2024-06-12 12:57:12 return __callback(args, **kwargs) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/uvicorn/main.py", line 416, in main 2024-06-12 12:57:12 run( 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/uvicorn/main.py", line 587, in run 2024-06-12 12:57:12 server.run() 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/uvicorn/server.py", line 61, in run 2024-06-12 12:57:12 return asyncio.run(self.serve(sockets=sockets)) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run 2024-06-12 12:57:12 return runner.run(main) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run 2024-06-12 12:57:12 return self._loop.run_until_complete(task) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete 2024-06-12 12:57:12 return future.result() 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/uvicorn/server.py", line 68, in serve 2024-06-12 12:57:12 config.load() 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/uvicorn/config.py", line 467, in load 2024-06-12 12:57:12 self.loaded_app = import_from_string(self.app) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/uvicorn/importer.py", line 21, in import_from_string 2024-06-12 12:57:12 module = importlib.import_module(module_str) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module 2024-06-12 12:57:12 return _bootstrap._gcd_import(name[level:], package, level) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "", line 1387, in _gcd_import 2024-06-12 12:57:12 File "", line 1360, in _find_and_load 2024-06-12 12:57:12 File "", line 1331, in _find_and_load_unlocked 2024-06-12 12:57:12 File "", line 935, in _load_unlocked 2024-06-12 12:57:12 File "", line 995, in exec_module 2024-06-12 12:57:12 File "", line 488, in _call_with_frames_removed 2024-06-12 12:57:12 File "/app/main.py", line 7, in 2024-06-12 12:57:12 from fastapi import FastAPI 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/fastapi/init.py", line 7, in 2024-06-12 12:57:12 from .applications import FastAPI as FastAPI 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/fastapi/applications.py", line 16, in 2024-06-12 12:57:12 from fastapi import routing 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 24, in 2024-06-12 12:57:12 from fastapi.dependencies.models import Dependant 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/fastapi/dependencies/models.py", line 3, in 2024-06-12 12:57:12 from fastapi.security.base import SecurityBase 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/fastapi/security/init.py", line 1, in 2024-06-12 12:57:12 from .api_key import APIKeyCookie as APIKeyCookie 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/fastapi/security/api_key.py", line 3, in 2024-06-12 12:57:12 from fastapi.openapi.models import APIKey, APIKeyIn 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/fastapi/openapi/models.py", line 103, in 2024-06-12 12:57:12 class Schema(BaseModel): 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 286, in new 2024-06-12 12:57:12 cls.try_update_forward_refs() 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 807, in try_update_forward_refs 2024-06-12 12:57:12 update_model_forward_refs(cls, cls.fields.values(), cls.config.json_encoders, localns, (NameError,)) 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/pydantic/typing.py", line 554, in update_model_forward_refs 2024-06-12 12:57:12 update_field_forward_refs(f, globalns=globalns, localns=localns) 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/pydantic/typing.py", line 520, in update_field_forwardrefs 2024-06-12 12:57:12 field.type = evaluateforwardref(field.type, globalns, localns or None) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 File "/usr/local/lib/python3.12/site-packages/pydantic/typing.py", line 66, in evaluateforwardref 2024-06-12 12:57:12 return cast(Any, type)._evaluate(globalns, localns, set()) 2024-06-12 12:57:12 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 12:57:12 TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'

To Reproduce

1) paste the image to the drop box area 2) receive the websocket unable to connect

Screenshots of backend AND frontend terminal logs image

DanielKong94 commented 5 months ago

i already fix this

abi commented 5 months ago

Great, how did you get this fixed?