run backend error
- Vorherrschende Sprache
- Python
- Sterne
- 78.7k
- Forks
- 9.6k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
poetry run uvicorn main:app --reload --port 7001
INFO: Will watch for changes in these directories: ['/Users/zhuhongji/Documents/workspace/screenshot-to-code/backend']
INFO: Uvicorn running on http://127.0.0.1:7001 (Press CTRL+C to quit)
INFO: Started reloader process [12100] using StatReload
Process SpawnProcess-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/uvicorn/server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/uvicorn/server.py", line 68, in serve
config.load()
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/uvicorn/config.py", line 467, in load
self.loaded_app = import_from_string(self.app)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/uvicorn/importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/Users/zhuhongji/Documents/workspace/screenshot-to-code/backend/main.py", line 7, in
from fastapi import FastAPI
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/fastapi/__init__.py", line 7, in
from .applications import FastAPI as FastAPI
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/fastapi/applications.py", line 16, in
from fastapi import routing
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/fastapi/routing.py", line 24, in
from fastapi.dependencies.models import Dependant
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/fastapi/dependencies/models.py", line 3, in
from fastapi.security.base import SecurityBase
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/fastapi/security/__init__.py", line 1, in
from .api_key import APIKeyCookie as APIKeyCookie
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/fastapi/security/api_key.py", line 3, in
from fastapi.openapi.models import APIKey, APIKeyIn
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/fastapi/openapi/models.py", line 103, in
class Schema(BaseModel):
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/pydantic/main.py", line 286, in __new__
cls.__try_update_forward_refs__()
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/pydantic/main.py", line 807, in __try_update_forward_refs__
update_model_forward_refs(cls, cls.__fields__.values(), cls.__config__.json_encoders, localns, (NameError,))
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/pydantic/typing.py", line 554, in update_model_forward_refs
update_field_forward_refs(f, globalns=globalns, localns=localns)
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/pydantic/typing.py", line 520, in update_field_forward_refs
field.type_ = evaluate_forwardref(field.type_, globalns, localns or None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/zhuhongji/Library/Caches/pypoetry/virtualenvs/backend-fXnATXJ6-py3.12/lib/python3.12/site-packages/pydantic/typing.py", line 66, in evaluate_forwardref
return cast(Any, type_)._evaluate(globalns, localns, set())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.