diff --git a/new-planet-backend/app/__pycache__/__init__.cpython-313.pyc b/new-planet-backend/app/__pycache__/__init__.cpython-313.pyc index 76e43ce..8e0fc71 100644 Binary files a/new-planet-backend/app/__pycache__/__init__.cpython-313.pyc and b/new-planet-backend/app/__pycache__/__init__.cpython-313.pyc differ diff --git a/new-planet-backend/app/__pycache__/config.cpython-313.pyc b/new-planet-backend/app/__pycache__/config.cpython-313.pyc index 655861b..ea0d63d 100644 Binary files a/new-planet-backend/app/__pycache__/config.cpython-313.pyc and b/new-planet-backend/app/__pycache__/config.cpython-313.pyc differ diff --git a/new-planet-backend/app/__pycache__/main.cpython-313.pyc b/new-planet-backend/app/__pycache__/main.cpython-313.pyc index adcc338..d177bcb 100644 Binary files a/new-planet-backend/app/__pycache__/main.cpython-313.pyc and b/new-planet-backend/app/__pycache__/main.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/__pycache__/__init__.cpython-313.pyc b/new-planet-backend/app/api/__pycache__/__init__.cpython-313.pyc index 24c60ba..ce2e9e0 100644 Binary files a/new-planet-backend/app/api/__pycache__/__init__.cpython-313.pyc and b/new-planet-backend/app/api/__pycache__/__init__.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/__pycache__/deps.cpython-313.pyc b/new-planet-backend/app/api/__pycache__/deps.cpython-313.pyc index 0be6cd7..2ca189c 100644 Binary files a/new-planet-backend/app/api/__pycache__/deps.cpython-313.pyc and b/new-planet-backend/app/api/__pycache__/deps.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/v1/__pycache__/__init__.cpython-313.pyc b/new-planet-backend/app/api/v1/__pycache__/__init__.cpython-313.pyc index 6014f92..7f94d73 100644 Binary files a/new-planet-backend/app/api/v1/__pycache__/__init__.cpython-313.pyc and b/new-planet-backend/app/api/v1/__pycache__/__init__.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/v1/__pycache__/ai.cpython-313.pyc b/new-planet-backend/app/api/v1/__pycache__/ai.cpython-313.pyc index da73169..ce54a4b 100644 Binary files a/new-planet-backend/app/api/v1/__pycache__/ai.cpython-313.pyc and b/new-planet-backend/app/api/v1/__pycache__/ai.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/v1/__pycache__/auth.cpython-313.pyc b/new-planet-backend/app/api/v1/__pycache__/auth.cpython-313.pyc index 1928dce..b3126ae 100644 Binary files a/new-planet-backend/app/api/v1/__pycache__/auth.cpython-313.pyc and b/new-planet-backend/app/api/v1/__pycache__/auth.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/v1/__pycache__/images.cpython-313.pyc b/new-planet-backend/app/api/v1/__pycache__/images.cpython-313.pyc index b0e2804..c405b42 100644 Binary files a/new-planet-backend/app/api/v1/__pycache__/images.cpython-313.pyc and b/new-planet-backend/app/api/v1/__pycache__/images.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/v1/__pycache__/rewards.cpython-313.pyc b/new-planet-backend/app/api/v1/__pycache__/rewards.cpython-313.pyc index 087fd5b..f5c14f3 100644 Binary files a/new-planet-backend/app/api/v1/__pycache__/rewards.cpython-313.pyc and b/new-planet-backend/app/api/v1/__pycache__/rewards.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/v1/__pycache__/router.cpython-313.pyc b/new-planet-backend/app/api/v1/__pycache__/router.cpython-313.pyc index 90e07d3..efa49e4 100644 Binary files a/new-planet-backend/app/api/v1/__pycache__/router.cpython-313.pyc and b/new-planet-backend/app/api/v1/__pycache__/router.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/v1/__pycache__/schedules.cpython-313.pyc b/new-planet-backend/app/api/v1/__pycache__/schedules.cpython-313.pyc index 21d8e14..56d5a1e 100644 Binary files a/new-planet-backend/app/api/v1/__pycache__/schedules.cpython-313.pyc and b/new-planet-backend/app/api/v1/__pycache__/schedules.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/v1/__pycache__/tasks.cpython-313.pyc b/new-planet-backend/app/api/v1/__pycache__/tasks.cpython-313.pyc index 3435eff..91b7537 100644 Binary files a/new-planet-backend/app/api/v1/__pycache__/tasks.cpython-313.pyc and b/new-planet-backend/app/api/v1/__pycache__/tasks.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/v1/__pycache__/websocket.cpython-313.pyc b/new-planet-backend/app/api/v1/__pycache__/websocket.cpython-313.pyc index 4dd4086..103e343 100644 Binary files a/new-planet-backend/app/api/v1/__pycache__/websocket.cpython-313.pyc and b/new-planet-backend/app/api/v1/__pycache__/websocket.cpython-313.pyc differ diff --git a/new-planet-backend/app/api/v1/schedules.py b/new-planet-backend/app/api/v1/schedules.py index b5f97e8..39cef5c 100644 --- a/new-planet-backend/app/api/v1/schedules.py +++ b/new-planet-backend/app/api/v1/schedules.py @@ -61,6 +61,10 @@ async def create_schedule( schedule_data = schedule_in.model_dump() schedule_data["user_id"] = current_user.id schedule = await crud_schedule.create(db, schedule_data) + + # Перезагрузить расписание с tasks для корректной сериализации + schedule = await crud_schedule.get_with_tasks(db, schedule.id) + return schedule @@ -86,6 +90,10 @@ async def update_schedule( update_data = schedule_in.model_dump(exclude_unset=True) schedule = await crud_schedule.update(db, schedule, update_data) + + # Перезагрузить расписание с tasks для корректной сериализации + schedule = await crud_schedule.get_with_tasks(db, schedule.id) + return schedule diff --git a/new-planet-backend/app/core/__pycache__/__init__.cpython-313.pyc b/new-planet-backend/app/core/__pycache__/__init__.cpython-313.pyc index 7c3e546..d603b83 100644 Binary files a/new-planet-backend/app/core/__pycache__/__init__.cpython-313.pyc and b/new-planet-backend/app/core/__pycache__/__init__.cpython-313.pyc differ diff --git a/new-planet-backend/app/core/__pycache__/config.cpython-313.pyc b/new-planet-backend/app/core/__pycache__/config.cpython-313.pyc index b4e0c7e..196b971 100644 Binary files a/new-planet-backend/app/core/__pycache__/config.cpython-313.pyc and b/new-planet-backend/app/core/__pycache__/config.cpython-313.pyc differ diff --git a/new-planet-backend/app/core/__pycache__/logging.cpython-313.pyc b/new-planet-backend/app/core/__pycache__/logging.cpython-313.pyc index 088f40e..0bf572f 100644 Binary files a/new-planet-backend/app/core/__pycache__/logging.cpython-313.pyc and b/new-planet-backend/app/core/__pycache__/logging.cpython-313.pyc differ diff --git a/new-planet-backend/app/core/__pycache__/security.cpython-313.pyc b/new-planet-backend/app/core/__pycache__/security.cpython-313.pyc index e6464d3..eb1bc5e 100644 Binary files a/new-planet-backend/app/core/__pycache__/security.cpython-313.pyc and b/new-planet-backend/app/core/__pycache__/security.cpython-313.pyc differ diff --git a/new-planet-backend/app/crud/__pycache__/__init__.cpython-313.pyc b/new-planet-backend/app/crud/__pycache__/__init__.cpython-313.pyc index 7226b02..da1be24 100644 Binary files a/new-planet-backend/app/crud/__pycache__/__init__.cpython-313.pyc and b/new-planet-backend/app/crud/__pycache__/__init__.cpython-313.pyc differ diff --git a/new-planet-backend/app/crud/__pycache__/base.cpython-313.pyc b/new-planet-backend/app/crud/__pycache__/base.cpython-313.pyc index 67745fa..dd06f62 100644 Binary files a/new-planet-backend/app/crud/__pycache__/base.cpython-313.pyc and b/new-planet-backend/app/crud/__pycache__/base.cpython-313.pyc differ diff --git a/new-planet-backend/app/crud/__pycache__/schedule.cpython-313.pyc b/new-planet-backend/app/crud/__pycache__/schedule.cpython-313.pyc index d5b2f8c..580f19e 100644 Binary files a/new-planet-backend/app/crud/__pycache__/schedule.cpython-313.pyc and b/new-planet-backend/app/crud/__pycache__/schedule.cpython-313.pyc differ diff --git a/new-planet-backend/app/crud/__pycache__/task.cpython-313.pyc b/new-planet-backend/app/crud/__pycache__/task.cpython-313.pyc index 815cd0e..4f9861c 100644 Binary files a/new-planet-backend/app/crud/__pycache__/task.cpython-313.pyc and b/new-planet-backend/app/crud/__pycache__/task.cpython-313.pyc differ diff --git a/new-planet-backend/app/crud/__pycache__/user.cpython-313.pyc b/new-planet-backend/app/crud/__pycache__/user.cpython-313.pyc index 0f4353c..db46ec0 100644 Binary files a/new-planet-backend/app/crud/__pycache__/user.cpython-313.pyc and b/new-planet-backend/app/crud/__pycache__/user.cpython-313.pyc differ diff --git a/new-planet-backend/app/db/__pycache__/__init__.cpython-313.pyc b/new-planet-backend/app/db/__pycache__/__init__.cpython-313.pyc index 9e1db1c..80e3033 100644 Binary files a/new-planet-backend/app/db/__pycache__/__init__.cpython-313.pyc and b/new-planet-backend/app/db/__pycache__/__init__.cpython-313.pyc differ diff --git a/new-planet-backend/app/db/__pycache__/base.cpython-313.pyc b/new-planet-backend/app/db/__pycache__/base.cpython-313.pyc index 673bbc0..4f73551 100644 Binary files a/new-planet-backend/app/db/__pycache__/base.cpython-313.pyc and b/new-planet-backend/app/db/__pycache__/base.cpython-313.pyc differ diff --git a/new-planet-backend/app/db/__pycache__/session.cpython-313.pyc b/new-planet-backend/app/db/__pycache__/session.cpython-313.pyc index 94cd423..b537d00 100644 Binary files a/new-planet-backend/app/db/__pycache__/session.cpython-313.pyc and b/new-planet-backend/app/db/__pycache__/session.cpython-313.pyc differ diff --git a/new-planet-backend/app/logs/app.log b/new-planet-backend/app/logs/app.log new file mode 100644 index 0000000..b4aeea6 --- /dev/null +++ b/new-planet-backend/app/logs/app.log @@ -0,0 +1,284 @@ +2025-12-26 19:02:56 - root - INFO - Starting up... +2025-12-26 19:02:56 - root - INFO - Starting up... +2025-12-26 19:02:59 - root - INFO - Shutting down... +2025-12-26 19:02:59 - root - INFO - Shutting down... +2025-12-26 19:03:28 - root - INFO - Starting up... +2025-12-26 19:03:28 - root - INFO - Starting up... +2025-12-26 19:36:24 - app.middleware.error_handler - ERROR - Unhandled exception: 1 validation error: + {'type': 'get_attribute_error', 'loc': ('response', 'tasks'), 'msg': "Error extracting attribute: MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)", 'input': , 'ctx': {'error': "MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)"}} + + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\api\v1\schedules.py", line 54, in create_schedule + POST /api/v1/schedules +Traceback (most recent call last): + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__ + await self.app(scope, receive, _send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 191, in __call__ + with recv_stream, send_stream, collapse_excgroups(): + ~~~~~~~~~~~~~~~~~~^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\contextlib.py", line 162, in __exit__ + self.gen.throw(value) + ~~~~~~~~~~~~~~^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_utils.py", line 85, in collapse_excgroups + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 193, in __call__ + response = await self.dispatch_func(request, call_next) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\middleware\rate_limiter.py", line 33, in dispatch + response = await call_next(request) + ^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 168, in call_next + raise app_exc from app_exc.__cause__ or app_exc.__context__ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 144, in coro + await self.app(scope, receive_or_disconnect, send_no_error) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\cors.py", line 85, in __call__ + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in __call__ + await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__ + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 716, in __call__ + await self.middleware_stack(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 736, in app + await route.handle(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 290, in handle + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 119, in app + await wrap_app_handling_exceptions(app, request)(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 105, in app + response = await f(request) + ^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 448, in app + content = await serialize_response( + ^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<10 lines>... + ) + ^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 274, in serialize_response + raise ResponseValidationError( + ...<3 lines>... + ) +fastapi.exceptions.ResponseValidationError: 1 validation error: + {'type': 'get_attribute_error', 'loc': ('response', 'tasks'), 'msg': "Error extracting attribute: MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)", 'input': , 'ctx': {'error': "MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)"}} + + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\api\v1\schedules.py", line 54, in create_schedule + POST /api/v1/schedules +2025-12-26 19:36:24 - app.middleware.error_handler - ERROR - Unhandled exception: 1 validation error: + {'type': 'get_attribute_error', 'loc': ('response', 'tasks'), 'msg': "Error extracting attribute: MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)", 'input': , 'ctx': {'error': "MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)"}} + + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\api\v1\schedules.py", line 54, in create_schedule + POST /api/v1/schedules +Traceback (most recent call last): + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__ + await self.app(scope, receive, _send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 191, in __call__ + with recv_stream, send_stream, collapse_excgroups(): + ~~~~~~~~~~~~~~~~~~^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\contextlib.py", line 162, in __exit__ + self.gen.throw(value) + ~~~~~~~~~~~~~~^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_utils.py", line 85, in collapse_excgroups + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 193, in __call__ + response = await self.dispatch_func(request, call_next) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\middleware\rate_limiter.py", line 33, in dispatch + response = await call_next(request) + ^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 168, in call_next + raise app_exc from app_exc.__cause__ or app_exc.__context__ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 144, in coro + await self.app(scope, receive_or_disconnect, send_no_error) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\cors.py", line 85, in __call__ + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in __call__ + await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__ + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 716, in __call__ + await self.middleware_stack(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 736, in app + await route.handle(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 290, in handle + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 119, in app + await wrap_app_handling_exceptions(app, request)(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 105, in app + response = await f(request) + ^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 448, in app + content = await serialize_response( + ^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<10 lines>... + ) + ^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 274, in serialize_response + raise ResponseValidationError( + ...<3 lines>... + ) +fastapi.exceptions.ResponseValidationError: 1 validation error: + {'type': 'get_attribute_error', 'loc': ('response', 'tasks'), 'msg': "Error extracting attribute: MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)", 'input': , 'ctx': {'error': "MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)"}} + + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\api\v1\schedules.py", line 54, in create_schedule + POST /api/v1/schedules +2025-12-26 19:37:04 - root - INFO - Shutting down... +2025-12-26 19:37:04 - root - INFO - Shutting down... +2025-12-26 19:37:13 - root - INFO - Starting up... +2025-12-26 19:37:13 - root - INFO - Starting up... +2025-12-26 19:38:27 - root - INFO - Shutting down... +2025-12-26 19:38:27 - root - INFO - Shutting down... +2025-12-26 19:39:43 - root - INFO - Starting up... +2025-12-26 19:39:43 - root - INFO - Starting up... +2025-12-26 19:40:04 - app.middleware.error_handler - ERROR - Unhandled exception: 1 validation error: + {'type': 'get_attribute_error', 'loc': ('response', 'tasks'), 'msg': "Error extracting attribute: MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)", 'input': , 'ctx': {'error': "MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)"}} + + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\api\v1\schedules.py", line 54, in create_schedule + POST /api/v1/schedules +Traceback (most recent call last): + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__ + await self.app(scope, receive, _send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 191, in __call__ + with recv_stream, send_stream, collapse_excgroups(): + ~~~~~~~~~~~~~~~~~~^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\contextlib.py", line 162, in __exit__ + self.gen.throw(value) + ~~~~~~~~~~~~~~^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_utils.py", line 85, in collapse_excgroups + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 193, in __call__ + response = await self.dispatch_func(request, call_next) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\middleware\rate_limiter.py", line 33, in dispatch + response = await call_next(request) + ^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 168, in call_next + raise app_exc from app_exc.__cause__ or app_exc.__context__ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 144, in coro + await self.app(scope, receive_or_disconnect, send_no_error) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\cors.py", line 85, in __call__ + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in __call__ + await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__ + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 716, in __call__ + await self.middleware_stack(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 736, in app + await route.handle(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 290, in handle + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 119, in app + await wrap_app_handling_exceptions(app, request)(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 105, in app + response = await f(request) + ^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 448, in app + content = await serialize_response( + ^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<10 lines>... + ) + ^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 274, in serialize_response + raise ResponseValidationError( + ...<3 lines>... + ) +fastapi.exceptions.ResponseValidationError: 1 validation error: + {'type': 'get_attribute_error', 'loc': ('response', 'tasks'), 'msg': "Error extracting attribute: MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)", 'input': , 'ctx': {'error': "MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)"}} + + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\api\v1\schedules.py", line 54, in create_schedule + POST /api/v1/schedules +2025-12-26 19:40:04 - app.middleware.error_handler - ERROR - Unhandled exception: 1 validation error: + {'type': 'get_attribute_error', 'loc': ('response', 'tasks'), 'msg': "Error extracting attribute: MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)", 'input': , 'ctx': {'error': "MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)"}} + + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\api\v1\schedules.py", line 54, in create_schedule + POST /api/v1/schedules +Traceback (most recent call last): + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__ + await self.app(scope, receive, _send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 191, in __call__ + with recv_stream, send_stream, collapse_excgroups(): + ~~~~~~~~~~~~~~~~~~^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\contextlib.py", line 162, in __exit__ + self.gen.throw(value) + ~~~~~~~~~~~~~~^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_utils.py", line 85, in collapse_excgroups + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 193, in __call__ + response = await self.dispatch_func(request, call_next) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\middleware\rate_limiter.py", line 33, in dispatch + response = await call_next(request) + ^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 168, in call_next + raise app_exc from app_exc.__cause__ or app_exc.__context__ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\base.py", line 144, in coro + await self.app(scope, receive_or_disconnect, send_no_error) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\cors.py", line 85, in __call__ + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in __call__ + await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__ + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 716, in __call__ + await self.middleware_stack(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 736, in app + await route.handle(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\routing.py", line 290, in handle + await self.app(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 119, in app + await wrap_app_handling_exceptions(app, request)(scope, receive, send) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app + raise exc + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 105, in app + response = await f(request) + ^^^^^^^^^^^^^^^^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 448, in app + content = await serialize_response( + ^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<10 lines>... + ) + ^ + File "C:\Users\yfili\AppData\Local\Programs\Python\Python313\Lib\site-packages\fastapi\routing.py", line 274, in serialize_response + raise ResponseValidationError( + ...<3 lines>... + ) +fastapi.exceptions.ResponseValidationError: 1 validation error: + {'type': 'get_attribute_error', 'loc': ('response', 'tasks'), 'msg': "Error extracting attribute: MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)", 'input': , 'ctx': {'error': "MissingGreenlet: greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)"}} + + File "C:\Users\yfili\Desktop\Planet\New-planet-api\new-planet-backend\app\api\v1\schedules.py", line 54, in create_schedule + POST /api/v1/schedules +2025-12-26 19:43:44 - root - INFO - Shutting down... +2025-12-26 19:43:44 - root - INFO - Shutting down... +2025-12-26 19:43:48 - root - INFO - Starting up... +2025-12-26 19:43:48 - root - INFO - Starting up... +2025-12-26 22:22:32 - root - INFO - Shutting down... +2025-12-26 22:22:32 - root - INFO - Shutting down... diff --git a/new-planet-backend/app/main.py b/new-planet-backend/app/main.py index 8404054..c0b49fb 100644 --- a/new-planet-backend/app/main.py +++ b/new-planet-backend/app/main.py @@ -88,7 +88,7 @@ if __name__ == "__main__": import uvicorn uvicorn.run( "app.main:app", - host="127.0.0.1", + host="0.0.0.0", port=8000, reload=settings.DEBUG ) diff --git a/new-planet-backend/app/middleware/__pycache__/__init__.cpython-313.pyc b/new-planet-backend/app/middleware/__pycache__/__init__.cpython-313.pyc index bedb909..e672991 100644 Binary files a/new-planet-backend/app/middleware/__pycache__/__init__.cpython-313.pyc and b/new-planet-backend/app/middleware/__pycache__/__init__.cpython-313.pyc differ diff --git a/new-planet-backend/app/middleware/__pycache__/auth.cpython-313.pyc b/new-planet-backend/app/middleware/__pycache__/auth.cpython-313.pyc index 43b0f99..fba5629 100644 Binary files a/new-planet-backend/app/middleware/__pycache__/auth.cpython-313.pyc and b/new-planet-backend/app/middleware/__pycache__/auth.cpython-313.pyc differ diff --git a/new-planet-backend/app/middleware/__pycache__/cors.cpython-313.pyc b/new-planet-backend/app/middleware/__pycache__/cors.cpython-313.pyc index e1a4dfa..13bffb7 100644 Binary files a/new-planet-backend/app/middleware/__pycache__/cors.cpython-313.pyc and b/new-planet-backend/app/middleware/__pycache__/cors.cpython-313.pyc differ diff --git a/new-planet-backend/app/middleware/__pycache__/error_handler.cpython-313.pyc b/new-planet-backend/app/middleware/__pycache__/error_handler.cpython-313.pyc index 4dcecc0..55abe4e 100644 Binary files a/new-planet-backend/app/middleware/__pycache__/error_handler.cpython-313.pyc and b/new-planet-backend/app/middleware/__pycache__/error_handler.cpython-313.pyc differ diff --git a/new-planet-backend/app/middleware/__pycache__/rate_limiter.cpython-313.pyc b/new-planet-backend/app/middleware/__pycache__/rate_limiter.cpython-313.pyc index 5a47b52..d4c5a57 100644 Binary files a/new-planet-backend/app/middleware/__pycache__/rate_limiter.cpython-313.pyc and b/new-planet-backend/app/middleware/__pycache__/rate_limiter.cpython-313.pyc differ diff --git a/new-planet-backend/app/models/__pycache__/__init__.cpython-313.pyc b/new-planet-backend/app/models/__pycache__/__init__.cpython-313.pyc index 8c6a960..f0a7e64 100644 Binary files a/new-planet-backend/app/models/__pycache__/__init__.cpython-313.pyc and b/new-planet-backend/app/models/__pycache__/__init__.cpython-313.pyc differ diff --git a/new-planet-backend/app/models/__pycache__/ai_conversation.cpython-313.pyc b/new-planet-backend/app/models/__pycache__/ai_conversation.cpython-313.pyc index fb6434c..ddf1116 100644 Binary files a/new-planet-backend/app/models/__pycache__/ai_conversation.cpython-313.pyc and b/new-planet-backend/app/models/__pycache__/ai_conversation.cpython-313.pyc differ diff --git a/new-planet-backend/app/models/__pycache__/reward.cpython-313.pyc b/new-planet-backend/app/models/__pycache__/reward.cpython-313.pyc index 4bb9bf4..312c617 100644 Binary files a/new-planet-backend/app/models/__pycache__/reward.cpython-313.pyc and b/new-planet-backend/app/models/__pycache__/reward.cpython-313.pyc differ diff --git a/new-planet-backend/app/models/__pycache__/schedule.cpython-313.pyc b/new-planet-backend/app/models/__pycache__/schedule.cpython-313.pyc index ec3a1df..a56ebc2 100644 Binary files a/new-planet-backend/app/models/__pycache__/schedule.cpython-313.pyc and b/new-planet-backend/app/models/__pycache__/schedule.cpython-313.pyc differ diff --git a/new-planet-backend/app/models/__pycache__/task.cpython-313.pyc b/new-planet-backend/app/models/__pycache__/task.cpython-313.pyc index 2484596..ceab7cc 100644 Binary files a/new-planet-backend/app/models/__pycache__/task.cpython-313.pyc and b/new-planet-backend/app/models/__pycache__/task.cpython-313.pyc differ diff --git a/new-planet-backend/app/models/__pycache__/user.cpython-313.pyc b/new-planet-backend/app/models/__pycache__/user.cpython-313.pyc index 1465dbc..53a45d7 100644 Binary files a/new-planet-backend/app/models/__pycache__/user.cpython-313.pyc and b/new-planet-backend/app/models/__pycache__/user.cpython-313.pyc differ diff --git a/new-planet-backend/app/schemas/__pycache__/__init__.cpython-313.pyc b/new-planet-backend/app/schemas/__pycache__/__init__.cpython-313.pyc index 05feed4..366ba67 100644 Binary files a/new-planet-backend/app/schemas/__pycache__/__init__.cpython-313.pyc and b/new-planet-backend/app/schemas/__pycache__/__init__.cpython-313.pyc differ diff --git a/new-planet-backend/app/schemas/__pycache__/ai.cpython-313.pyc b/new-planet-backend/app/schemas/__pycache__/ai.cpython-313.pyc index 7c950c8..2262c90 100644 Binary files a/new-planet-backend/app/schemas/__pycache__/ai.cpython-313.pyc and b/new-planet-backend/app/schemas/__pycache__/ai.cpython-313.pyc differ diff --git a/new-planet-backend/app/schemas/__pycache__/reward.cpython-313.pyc b/new-planet-backend/app/schemas/__pycache__/reward.cpython-313.pyc index 90c9116..c66a189 100644 Binary files a/new-planet-backend/app/schemas/__pycache__/reward.cpython-313.pyc and b/new-planet-backend/app/schemas/__pycache__/reward.cpython-313.pyc differ diff --git a/new-planet-backend/app/schemas/__pycache__/schedule.cpython-313.pyc b/new-planet-backend/app/schemas/__pycache__/schedule.cpython-313.pyc index 5bee4f9..ae5e914 100644 Binary files a/new-planet-backend/app/schemas/__pycache__/schedule.cpython-313.pyc and b/new-planet-backend/app/schemas/__pycache__/schedule.cpython-313.pyc differ diff --git a/new-planet-backend/app/schemas/__pycache__/task.cpython-313.pyc b/new-planet-backend/app/schemas/__pycache__/task.cpython-313.pyc index 9df279d..c064e20 100644 Binary files a/new-planet-backend/app/schemas/__pycache__/task.cpython-313.pyc and b/new-planet-backend/app/schemas/__pycache__/task.cpython-313.pyc differ diff --git a/new-planet-backend/app/schemas/__pycache__/token.cpython-313.pyc b/new-planet-backend/app/schemas/__pycache__/token.cpython-313.pyc index a270bea..f6db679 100644 Binary files a/new-planet-backend/app/schemas/__pycache__/token.cpython-313.pyc and b/new-planet-backend/app/schemas/__pycache__/token.cpython-313.pyc differ diff --git a/new-planet-backend/app/schemas/__pycache__/user.cpython-313.pyc b/new-planet-backend/app/schemas/__pycache__/user.cpython-313.pyc index ef7356d..bc7652b 100644 Binary files a/new-planet-backend/app/schemas/__pycache__/user.cpython-313.pyc and b/new-planet-backend/app/schemas/__pycache__/user.cpython-313.pyc differ diff --git a/new-planet-backend/app/services/__pycache__/__init__.cpython-313.pyc b/new-planet-backend/app/services/__pycache__/__init__.cpython-313.pyc index 6decf26..30a7aeb 100644 Binary files a/new-planet-backend/app/services/__pycache__/__init__.cpython-313.pyc and b/new-planet-backend/app/services/__pycache__/__init__.cpython-313.pyc differ diff --git a/new-planet-backend/app/services/__pycache__/ai_agent_client.cpython-313.pyc b/new-planet-backend/app/services/__pycache__/ai_agent_client.cpython-313.pyc index 94705ce..48df51a 100644 Binary files a/new-planet-backend/app/services/__pycache__/ai_agent_client.cpython-313.pyc and b/new-planet-backend/app/services/__pycache__/ai_agent_client.cpython-313.pyc differ diff --git a/new-planet-backend/app/services/__pycache__/auth_service.cpython-313.pyc b/new-planet-backend/app/services/__pycache__/auth_service.cpython-313.pyc index 6f2ae65..ea6a982 100644 Binary files a/new-planet-backend/app/services/__pycache__/auth_service.cpython-313.pyc and b/new-planet-backend/app/services/__pycache__/auth_service.cpython-313.pyc differ diff --git a/new-planet-backend/app/services/__pycache__/cache_service.cpython-313.pyc b/new-planet-backend/app/services/__pycache__/cache_service.cpython-313.pyc index f1ef06b..253852e 100644 Binary files a/new-planet-backend/app/services/__pycache__/cache_service.cpython-313.pyc and b/new-planet-backend/app/services/__pycache__/cache_service.cpython-313.pyc differ diff --git a/new-planet-backend/app/services/__pycache__/chat_service.cpython-313.pyc b/new-planet-backend/app/services/__pycache__/chat_service.cpython-313.pyc index 3722fa3..69c74fb 100644 Binary files a/new-planet-backend/app/services/__pycache__/chat_service.cpython-313.pyc and b/new-planet-backend/app/services/__pycache__/chat_service.cpython-313.pyc differ diff --git a/new-planet-backend/app/services/__pycache__/gigachat_service.cpython-313.pyc b/new-planet-backend/app/services/__pycache__/gigachat_service.cpython-313.pyc index 1acbb79..7aa965d 100644 Binary files a/new-planet-backend/app/services/__pycache__/gigachat_service.cpython-313.pyc and b/new-planet-backend/app/services/__pycache__/gigachat_service.cpython-313.pyc differ diff --git a/new-planet-backend/app/services/__pycache__/schedule_generator.cpython-313.pyc b/new-planet-backend/app/services/__pycache__/schedule_generator.cpython-313.pyc index 325bca1..d375096 100644 Binary files a/new-planet-backend/app/services/__pycache__/schedule_generator.cpython-313.pyc and b/new-planet-backend/app/services/__pycache__/schedule_generator.cpython-313.pyc differ diff --git a/new-planet-backend/app/services/__pycache__/storage_service.cpython-313.pyc b/new-planet-backend/app/services/__pycache__/storage_service.cpython-313.pyc index b926ed4..15c0bca 100644 Binary files a/new-planet-backend/app/services/__pycache__/storage_service.cpython-313.pyc and b/new-planet-backend/app/services/__pycache__/storage_service.cpython-313.pyc differ