result.txt 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. 2026-05-21T09:07:28.965573273Z app/core/
  2. 2026-05-21T09:07:28.965582083Z app/services/__pycache__/
  3. 2026-05-21T09:07:29.006816071Z
  4. 2026-05-21T09:07:29.006849199Z sent 2,764 bytes received 45 bytes 160.51 bytes/sec
  5. 2026-05-21T09:07:29.006859242Z total size is 251,292 speedup is 89.46
  6. 2026-05-21T09:07:29.009059557Z => Sync done.
  7. 2026-05-21T09:07:32.554614348Z INFO: Started server process [1]
  8. 2026-05-21T09:07:32.554721459Z INFO: Waiting for application startup.
  9. 2026-05-21T09:07:32.701656602Z 2026-05-21 09:07:32 | INFO | peft-platform | JobQueue started with 2 workers
  10. 2026-05-21T09:07:32.701760487Z INFO: Application startup complete.
  11. 2026-05-21T09:07:32.702216450Z INFO: Uvicorn running on http://0.0.0.0:8010 (Press CTRL+C to quit)
  12. 2026-05-21T09:07:37.547354571Z INFO: 127.0.0.1:38274 - "GET /health HTTP/1.1" 200 OK
  13. 2026-05-21T09:07:52.977770642Z INFO: 172.20.0.4:34488 - "GET /api/v1/models/ HTTP/1.0" 401 Unauthorized
  14. 2026-05-21T09:07:52.979307264Z INFO: 172.20.0.4:34498 - "GET /api/v1/training/jobs HTTP/1.0" 401 Unauthorized
  15. 2026-05-21T09:07:52.980619287Z INFO: 172.20.0.4:34506 - "GET /api/v1/datasets/ HTTP/1.0" 401 Unauthorized
  16. 2026-05-21T09:08:07.746802896Z INFO: 127.0.0.1:59232 - "GET /health HTTP/1.1" 200 OK
  17. 2026-05-21T09:08:18.534595819Z INFO: 172.20.0.4:52088 - "GET /auth/sso/authorize?redirect=true HTTP/1.0" 307 Temporary Redirect
  18. 2026-05-21T09:08:20.285032265Z INFO: 172.20.0.4:52104 - "GET /auth/sso/authorize?redirect=true HTTP/1.0" 307 Temporary Redirect
  19. 2026-05-21T09:08:27.236514367Z INFO: 172.20.0.4:53808 - "GET /auth/sso/authorize?redirect=true HTTP/1.0" 307 Temporary Redirect
  20. 2026-05-21T09:08:27.723199510Z INFO: 172.20.0.4:53822 - "GET /auth/sso/authorize?redirect=true HTTP/1.0" 307 Temporary Redirect
  21. 2026-05-21T09:08:27.886384722Z INFO: 172.20.0.4:53824 - "GET /auth/sso/authorize?redirect=true HTTP/1.0" 307 Temporary Redirect
  22. 2026-05-21T09:08:28.056337627Z INFO: 172.20.0.4:53840 - "GET /auth/sso/authorize?redirect=true HTTP/1.0" 307 Temporary Redirect
  23. 2026-05-21T09:08:29.911054756Z 2026-05-21 09:08:29 | INFO | app.api.auth | [SSO] exchange_code start, code=rBzQGQSO3R
  24. 2026-05-21T09:08:29.911110656Z 2026-05-21 09:08:29 | INFO | app.api.auth | [SSO] sso_base_url=http://192.168.92.61:8200
  25. 2026-05-21T09:08:29.911125216Z 2026-05-21 09:08:29 | INFO | app.api.auth | [SSO] client_id=hmDeOtXZVbeo2AZ-x58yPssZLg4Tcb1W
  26. 2026-05-21T09:08:29.911134465Z 2026-05-21 09:08:29 | INFO | app.api.auth | [SSO] redirect_uri=http://192.168.92.151:3000/auth/callback
  27. 2026-05-21T09:08:30.081659122Z 2026-05-21 09:08:30 | INFO | httpx | HTTP Request: POST http://192.168.92.61:8200/oauth/token "HTTP/1.1 200 OK"
  28. 2026-05-21T09:08:30.082809643Z 2026-05-21 09:08:30 | INFO | app.api.auth | [SSO] token response: {'access_token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1MDAwMDAwMC0wMDAwLTQwMDAtODAwMC0wMDAwMDAwMDAwMDAiLCJjbGllbnRfaWQiOiJobURlT3RYWlZiZW8yQVoteDU4eVBzc1pMZzRUY2IxVyIsInNjb3BlIjoicHJvZmlsZSBlbWFpbCIsImV4cCI6MTc3OTM1NTcxMCwiaWF0IjoxNzc5MzU0NTEwfQ.joK4ppobgyG7FJ_7VygPCxaWIFJhVdggFWbj3zT5VQo', 'token_type': 'Bearer', 'expires_in': 1800, 'refresh_token': 'aiM69DQpcxp6brDmAPxwmOEcCMY8XiJVJRcr3uoenVw', 'scope': 'profile email'}
  29. 2026-05-21T09:08:30.115741823Z 2026-05-21 09:08:30 | INFO | httpx | HTTP Request: GET http://192.168.92.61:8200/oauth/userinfo "HTTP/1.1 200 OK"
  30. 2026-05-21T09:08:30.117367101Z 2026-05-21 09:08:30 | INFO | app.api.auth | [SSO] userinfo: {'sub': 'u0000000-0000-4000-8000-000000000000', 'roles': [{'name': '超级管理员', 'code': 'super_admin'}], 'username': 'super_admin', 'avatar_url': None, 'real_name': '超级管理员', 'company': None, 'department': None, 'position': '超级管理员', 'email': 'super_admin@lqai.com'}
  31. 2026-05-21T09:08:30.171856426Z 2026-05-21 09:08:30 | ERROR | app.api.auth | [SSO] exchange_code failed: Traceback (most recent call last):
  32. 2026-05-21T09:08:30.171934024Z File "asyncpg/protocol/prepared_stmt.pyx", line 175, in asyncpg.protocol.protocol.PreparedStatementState._encode_bind_msg
  33. 2026-05-21T09:08:30.171949981Z File "asyncpg/protocol/codecs/base.pyx", line 251, in asyncpg.protocol.protocol.Codec.encode
  34. 2026-05-21T09:08:30.171958069Z File "asyncpg/protocol/codecs/base.pyx", line 153, in asyncpg.protocol.protocol.Codec.encode_scalar
  35. 2026-05-21T09:08:30.171965491Z File "asyncpg/pgproto/codecs/datetime.pyx", line 152, in asyncpg.pgproto.pgproto.timestamp_encode
  36. 2026-05-21T09:08:30.171972748Z TypeError: can't subtract offset-naive and offset-aware datetimes
  37. 2026-05-21T09:08:30.171980194Z
  38. 2026-05-21T09:08:30.171987156Z The above exception was the direct cause of the following exception:
  39. 2026-05-21T09:08:30.171994262Z
  40. 2026-05-21T09:08:30.172001190Z Traceback (most recent call last):
  41. 2026-05-21T09:08:30.172008409Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 550, in _prepare_and_execute
  42. 2026-05-21T09:08:30.172015811Z self._rows = deque(await prepared_stmt.fetch(*parameters))
  43. 2026-05-21T09:08:30.172023291Z File "/usr/local/lib/python3.10/site-packages/asyncpg/prepared_stmt.py", line 177, in fetch
  44. 2026-05-21T09:08:30.172030580Z data = await self.__bind_execute(args, 0, timeout)
  45. 2026-05-21T09:08:30.172037707Z File "/usr/local/lib/python3.10/site-packages/asyncpg/prepared_stmt.py", line 268, in __bind_execute
  46. 2026-05-21T09:08:30.172044996Z data, status, _ = await self.__do_execute(
  47. 2026-05-21T09:08:30.172052114Z File "/usr/local/lib/python3.10/site-packages/asyncpg/prepared_stmt.py", line 257, in __do_execute
  48. 2026-05-21T09:08:30.172059402Z return await executor(protocol)
  49. 2026-05-21T09:08:30.172096523Z File "asyncpg/protocol/protocol.pyx", line 184, in bind_execute
  50. 2026-05-21T09:08:30.172104302Z File "asyncpg/protocol/prepared_stmt.pyx", line 204, in asyncpg.protocol.protocol.PreparedStatementState._encode_bind_msg
  51. 2026-05-21T09:08:30.172111764Z asyncpg.exceptions.DataError: invalid input for query argument $4: datetime.datetime(2026, 5, 22, 9, 8, 30,... (can't subtract offset-naive and offset-aware datetimes)
  52. 2026-05-21T09:08:30.172119176Z
  53. 2026-05-21T09:08:30.172126123Z The above exception was the direct cause of the following exception:
  54. 2026-05-21T09:08:30.172133188Z
  55. 2026-05-21T09:08:30.172140015Z Traceback (most recent call last):
  56. 2026-05-21T09:08:30.172147207Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
  57. 2026-05-21T09:08:30.172154494Z self.dialect.do_execute(
  58. 2026-05-21T09:08:30.172161534Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
  59. 2026-05-21T09:08:30.172170175Z cursor.execute(statement, parameters)
  60. 2026-05-21T09:08:30.172177479Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 585, in execute
  61. 2026-05-21T09:08:30.172184838Z self._adapt_connection.await_(
  62. 2026-05-21T09:08:30.172191868Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 132, in await_only
  63. 2026-05-21T09:08:30.172199170Z return current.parent.switch(awaitable) # type: ignore[no-any-return,attr-defined] # noqa: E501
  64. 2026-05-21T09:08:30.172206502Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 196, in greenlet_spawn
  65. 2026-05-21T09:08:30.172290143Z value = await result
  66. 2026-05-21T09:08:30.172319518Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 563, in _prepare_and_execute
  67. 2026-05-21T09:08:30.172328850Z self._handle_exception(error)
  68. 2026-05-21T09:08:30.172336367Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 513, in _handle_exception
  69. 2026-05-21T09:08:30.172343780Z self._adapt_connection._handle_exception(error)
  70. 2026-05-21T09:08:30.172350877Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 797, in _handle_exception
  71. 2026-05-21T09:08:30.172358354Z raise translated_error from error
  72. 2026-05-21T09:08:30.172365511Z sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.Error: <class 'asyncpg.exceptions.DataError'>: invalid input for query argument $4: datetime.datetime(2026, 5, 22, 9, 8, 30,... (can't subtract offset-naive and offset-aware datetimes)
  73. 2026-05-21T09:08:30.172374256Z
  74. 2026-05-21T09:08:30.172381306Z The above exception was the direct cause of the following exception:
  75. 2026-05-21T09:08:30.172388441Z
  76. 2026-05-21T09:08:30.172395359Z Traceback (most recent call last):
  77. 2026-05-21T09:08:30.172418248Z File "/app/app/api/auth.py", line 106, in exchange_code
  78. 2026-05-21T09:08:30.172425986Z await session.commit()
  79. 2026-05-21T09:08:30.172433042Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/ext/asyncio/session.py", line 1000, in commit
  80. 2026-05-21T09:08:30.172440381Z await greenlet_spawn(self.sync_session.commit)
  81. 2026-05-21T09:08:30.172447622Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 203, in greenlet_spawn
  82. 2026-05-21T09:08:30.172454935Z result = context.switch(value)
  83. 2026-05-21T09:08:30.172461947Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2030, in commit
  84. 2026-05-21T09:08:30.172469244Z trans.commit(_to_root=True)
  85. 2026-05-21T09:08:30.172476262Z File "<string>", line 2, in commit
  86. 2026-05-21T09:08:30.172483698Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/state_changes.py", line 137, in _go
  87. 2026-05-21T09:08:30.172492877Z ret_value = fn(self, *arg, **kw)
  88. 2026-05-21T09:08:30.172500164Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1311, in commit
  89. 2026-05-21T09:08:30.172507488Z self._prepare_impl()
  90. 2026-05-21T09:08:30.172514559Z File "<string>", line 2, in _prepare_impl
  91. 2026-05-21T09:08:30.172521854Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/state_changes.py", line 137, in _go
  92. 2026-05-21T09:08:30.172529380Z ret_value = fn(self, *arg, **kw)
  93. 2026-05-21T09:08:30.172536471Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1286, in _prepare_impl
  94. 2026-05-21T09:08:30.172543878Z self.session.flush()
  95. 2026-05-21T09:08:30.172550892Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 4331, in flush
  96. 2026-05-21T09:08:30.172558223Z self._flush(objects)
  97. 2026-05-21T09:08:30.172565985Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 4466, in _flush
  98. 2026-05-21T09:08:30.172573680Z with util.safe_reraise():
  99. 2026-05-21T09:08:30.172580738Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 121, in __exit__
  100. 2026-05-21T09:08:30.172588112Z raise exc_value.with_traceback(exc_tb)
  101. 2026-05-21T09:08:30.172595197Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 4427, in _flush
  102. 2026-05-21T09:08:30.172602480Z flush_context.execute()
  103. 2026-05-21T09:08:30.172609602Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/unitofwork.py", line 466, in execute
  104. 2026-05-21T09:08:30.172616905Z rec.execute(self)
  105. 2026-05-21T09:08:30.172612046Z INFO: 172.20.0.4:53848 - "POST /api/oauth/exchange-code HTTP/1.0" 500 Internal Server Error
  106. 2026-05-21T09:08:30.172623980Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/unitofwork.py", line 642, in execute
  107. 2026-05-21T09:08:30.172672981Z util.preloaded.orm_persistence.save_obj(
  108. 2026-05-21T09:08:30.172682393Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/persistence.py", line 93, in save_obj
  109. 2026-05-21T09:08:30.172690027Z _emit_insert_statements(
  110. 2026-05-21T09:08:30.172697151Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/persistence.py", line 1048, in _emit_insert_statements
  111. 2026-05-21T09:08:30.172704563Z result = connection.execute(
  112. 2026-05-21T09:08:30.172711589Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1419, in execute
  113. 2026-05-21T09:08:30.172719184Z return meth(
  114. 2026-05-21T09:08:30.172726296Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 527, in _execute_on_connection
  115. 2026-05-21T09:08:30.172733722Z return connection._execute_clauseelement(
  116. 2026-05-21T09:08:30.172740890Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1641, in _execute_clauseelement
  117. 2026-05-21T09:08:30.172748406Z ret = self._execute_context(
  118. 2026-05-21T09:08:30.172756941Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
  119. 2026-05-21T09:08:30.172764551Z return self._exec_single_context(
  120. 2026-05-21T09:08:30.172771674Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
  121. 2026-05-21T09:08:30.172779284Z self._handle_dbapi_exception(
  122. 2026-05-21T09:08:30.172786495Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2363, in _handle_dbapi_exception
  123. 2026-05-21T09:08:30.172793841Z raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  124. 2026-05-21T09:08:30.172800972Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
  125. 2026-05-21T09:08:30.172808480Z self.dialect.do_execute(
  126. 2026-05-21T09:08:30.172815599Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
  127. 2026-05-21T09:08:30.172822903Z cursor.execute(statement, parameters)
  128. 2026-05-21T09:08:30.172830012Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 585, in execute
  129. 2026-05-21T09:08:30.172837628Z self._adapt_connection.await_(
  130. 2026-05-21T09:08:30.172844663Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 132, in await_only
  131. 2026-05-21T09:08:30.172852008Z return current.parent.switch(awaitable) # type: ignore[no-any-return,attr-defined] # noqa: E501
  132. 2026-05-21T09:08:30.172859257Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 196, in greenlet_spawn
  133. 2026-05-21T09:08:30.172866777Z value = await result
  134. 2026-05-21T09:08:30.172873797Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 563, in _prepare_and_execute
  135. 2026-05-21T09:08:30.172890373Z self._handle_exception(error)
  136. 2026-05-21T09:08:30.172897578Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 513, in _handle_exception
  137. 2026-05-21T09:08:30.172904967Z self._adapt_connection._handle_exception(error)
  138. 2026-05-21T09:08:30.172912002Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 797, in _handle_exception
  139. 2026-05-21T09:08:30.172919438Z raise translated_error from error
  140. 2026-05-21T09:08:30.172926553Z sqlalchemy.exc.DBAPIError: (sqlalchemy.dialects.postgresql.asyncpg.Error) <class 'asyncpg.exceptions.DataError'>: invalid input for query argument $4: datetime.datetime(2026, 5, 22, 9, 8, 30,... (can't subtract offset-naive and offset-aware datetimes)
  141. 2026-05-21T09:08:30.172935282Z [SQL: INSERT INTO refresh_tokens (id, user_id, token, expires_at, revoked, created_at) VALUES ($1::VARCHAR, $2::VARCHAR, $3::VARCHAR, $4::TIMESTAMP WITHOUT TIME ZONE, $5::INTEGER, $6::TIMESTAMP WITHOUT TIME ZONE)]
  142. 2026-05-21T09:08:30.172942908Z [parameters: ('8a1e812a-0e5d-4438-b686-7e1324fe30ab', 'af827b1d-03b1-40dc-99b0-c8dca135a06e', 'rt_34bca8158df04cd190615d74426399f43823c751b93b4213', datetime.datetime(2026, 5, 22, 9, 8, 30, 158239, tzinfo=datetime.timezone.utc), 0, datetime.datetime(2026, 5, 21, 9, 8, 30, 160428))]
  143. 2026-05-21T09:08:30.172950582Z (Background on this error at: https://sqlalche.me/e/20/dbapi)
  144. 2026-05-21T09:08:30.172957717Z
  145. 2026-05-21T09:08:34.443177810Z 2026-05-21 09:08:34 | INFO | app.api.auth | [SSO] exchange_code start, code=EUM7S190Ev
  146. 2026-05-21T09:08:34.443250071Z 2026-05-21 09:08:34 | INFO | app.api.auth | [SSO] sso_base_url=http://192.168.92.61:8200
  147. 2026-05-21T09:08:34.443260598Z 2026-05-21 09:08:34 | INFO | app.api.auth | [SSO] client_id=hmDeOtXZVbeo2AZ-x58yPssZLg4Tcb1W
  148. 2026-05-21T09:08:34.443268088Z 2026-05-21 09:08:34 | INFO | app.api.auth | [SSO] redirect_uri=http://192.168.92.151:3000/auth/callback
  149. 2026-05-21T09:08:34.475327518Z 2026-05-21 09:08:34 | INFO | httpx | HTTP Request: POST http://192.168.92.61:8200/oauth/token "HTTP/1.1 200 OK"
  150. 2026-05-21T09:08:34.476725113Z 2026-05-21 09:08:34 | INFO | app.api.auth | [SSO] token response: {'access_token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1MDAwMDAwMC0wMDAwLTQwMDAtODAwMC0wMDAwMDAwMDAwMDAiLCJjbGllbnRfaWQiOiJobURlT3RYWlZiZW8yQVoteDU4eVBzc1pMZzRUY2IxVyIsInNjb3BlIjoicHJvZmlsZSBlbWFpbCIsImV4cCI6MTc3OTM1NTcxNCwiaWF0IjoxNzc5MzU0NTE0fQ.hyettMa2ItZpoSBiDrfyeX8yYAbXVAnzytQzIZO7cuQ', 'token_type': 'Bearer', 'expires_in': 1800, 'refresh_token': 'SpHYi9WhxM_pQvqbbPBORHlJMuiyaV6M7lGk_8rl3Eo', 'scope': 'profile email'}
  151. 2026-05-21T09:08:34.500651786Z 2026-05-21 09:08:34 | INFO | httpx | HTTP Request: GET http://192.168.92.61:8200/oauth/userinfo "HTTP/1.1 200 OK"
  152. 2026-05-21T09:08:34.502106505Z 2026-05-21 09:08:34 | INFO | app.api.auth | [SSO] userinfo: {'sub': 'u0000000-0000-4000-8000-000000000000', 'roles': [{'name': '超级管理员', 'code': 'super_admin'}], 'username': 'super_admin', 'avatar_url': None, 'real_name': '超级管理员', 'company': None, 'department': None, 'position': '超级管理员', 'email': 'super_admin@lqai.com'}
  153. 2026-05-21T09:08:34.512605325Z 2026-05-21 09:08:34 | ERROR | app.api.auth | [SSO] exchange_code failed: Traceback (most recent call last):
  154. 2026-05-21T09:08:34.512683648Z File "asyncpg/protocol/prepared_stmt.pyx", line 175, in asyncpg.protocol.protocol.PreparedStatementState._encode_bind_msg
  155. 2026-05-21T09:08:34.512695372Z File "asyncpg/protocol/codecs/base.pyx", line 251, in asyncpg.protocol.protocol.Codec.encode
  156. 2026-05-21T09:08:34.512703146Z File "asyncpg/protocol/codecs/base.pyx", line 153, in asyncpg.protocol.protocol.Codec.encode_scalar
  157. 2026-05-21T09:08:34.512710486Z File "asyncpg/pgproto/codecs/datetime.pyx", line 152, in asyncpg.pgproto.pgproto.timestamp_encode
  158. 2026-05-21T09:08:34.512717860Z TypeError: can't subtract offset-naive and offset-aware datetimes
  159. 2026-05-21T09:08:34.512725171Z
  160. 2026-05-21T09:08:34.512733578Z The above exception was the direct cause of the following exception:
  161. 2026-05-21T09:08:34.512744793Z
  162. 2026-05-21T09:08:34.512754768Z Traceback (most recent call last):
  163. 2026-05-21T09:08:34.512765349Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 550, in _prepare_and_execute
  164. 2026-05-21T09:08:34.512776244Z self._rows = deque(await prepared_stmt.fetch(*parameters))
  165. 2026-05-21T09:08:34.512786333Z File "/usr/local/lib/python3.10/site-packages/asyncpg/prepared_stmt.py", line 177, in fetch
  166. 2026-05-21T09:08:34.512786493Z INFO: 172.20.0.4:44472 - "POST /api/oauth/exchange-code HTTP/1.0" 500 Internal Server Error
  167. 2026-05-21T09:08:34.512796400Z data = await self.__bind_execute(args, 0, timeout)
  168. 2026-05-21T09:08:34.512821308Z File "/usr/local/lib/python3.10/site-packages/asyncpg/prepared_stmt.py", line 268, in __bind_execute
  169. 2026-05-21T09:08:34.512829564Z data, status, _ = await self.__do_execute(
  170. 2026-05-21T09:08:34.512837666Z File "/usr/local/lib/python3.10/site-packages/asyncpg/prepared_stmt.py", line 257, in __do_execute
  171. 2026-05-21T09:08:34.512848444Z return await executor(protocol)
  172. 2026-05-21T09:08:34.512857459Z File "asyncpg/protocol/protocol.pyx", line 184, in bind_execute
  173. 2026-05-21T09:08:34.512864800Z File "asyncpg/protocol/prepared_stmt.pyx", line 204, in asyncpg.protocol.protocol.PreparedStatementState._encode_bind_msg
  174. 2026-05-21T09:08:34.512872449Z asyncpg.exceptions.DataError: invalid input for query argument $1: datetime.datetime(2026, 5, 21, 9, 8, 34,... (can't subtract offset-naive and offset-aware datetimes)
  175. 2026-05-21T09:08:34.512880167Z
  176. 2026-05-21T09:08:34.512887788Z The above exception was the direct cause of the following exception:
  177. 2026-05-21T09:08:34.512894931Z
  178. 2026-05-21T09:08:34.512901829Z Traceback (most recent call last):
  179. 2026-05-21T09:08:34.512910121Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
  180. 2026-05-21T09:08:34.512920571Z self.dialect.do_execute(
  181. 2026-05-21T09:08:34.512930533Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
  182. 2026-05-21T09:08:34.512946317Z cursor.execute(statement, parameters)
  183. 2026-05-21T09:08:34.512978113Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 585, in execute
  184. 2026-05-21T09:08:34.512989921Z self._adapt_connection.await_(
  185. 2026-05-21T09:08:34.512999742Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 132, in await_only
  186. 2026-05-21T09:08:34.513007310Z return current.parent.switch(awaitable) # type: ignore[no-any-return,attr-defined] # noqa: E501
  187. 2026-05-21T09:08:34.513014744Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 196, in greenlet_spawn
  188. 2026-05-21T09:08:34.513030170Z value = await result
  189. 2026-05-21T09:08:34.513040062Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 563, in _prepare_and_execute
  190. 2026-05-21T09:08:34.513047793Z self._handle_exception(error)
  191. 2026-05-21T09:08:34.513054786Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 513, in _handle_exception
  192. 2026-05-21T09:08:34.513062091Z self._adapt_connection._handle_exception(error)
  193. 2026-05-21T09:08:34.513069126Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 797, in _handle_exception
  194. 2026-05-21T09:08:34.513076402Z raise translated_error from error
  195. 2026-05-21T09:08:34.513083629Z sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.Error: <class 'asyncpg.exceptions.DataError'>: invalid input for query argument $1: datetime.datetime(2026, 5, 21, 9, 8, 34,... (can't subtract offset-naive and offset-aware datetimes)
  196. 2026-05-21T09:08:34.513091642Z
  197. 2026-05-21T09:08:34.513098652Z The above exception was the direct cause of the following exception:
  198. 2026-05-21T09:08:34.513105678Z
  199. 2026-05-21T09:08:34.513112550Z Traceback (most recent call last):
  200. 2026-05-21T09:08:34.513119577Z File "/app/app/api/auth.py", line 90, in exchange_code
  201. 2026-05-21T09:08:34.513126757Z user = await _sync_user(sso_userinfo)
  202. 2026-05-21T09:08:34.513133881Z File "/app/app/api/auth.py", line 62, in _sync_user
  203. 2026-05-21T09:08:34.513141013Z await session.commit()
  204. 2026-05-21T09:08:34.513147968Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/ext/asyncio/session.py", line 1000, in commit
  205. 2026-05-21T09:08:34.513155428Z await greenlet_spawn(self.sync_session.commit)
  206. 2026-05-21T09:08:34.513162519Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 203, in greenlet_spawn
  207. 2026-05-21T09:08:34.513169800Z result = context.switch(value)
  208. 2026-05-21T09:08:34.513176784Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2030, in commit
  209. 2026-05-21T09:08:34.513184031Z trans.commit(_to_root=True)
  210. 2026-05-21T09:08:34.513191139Z File "<string>", line 2, in commit
  211. 2026-05-21T09:08:34.513199636Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/state_changes.py", line 137, in _go
  212. 2026-05-21T09:08:34.513219249Z ret_value = fn(self, *arg, **kw)
  213. 2026-05-21T09:08:34.513226873Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1311, in commit
  214. 2026-05-21T09:08:34.513234068Z self._prepare_impl()
  215. 2026-05-21T09:08:34.513241031Z File "<string>", line 2, in _prepare_impl
  216. 2026-05-21T09:08:34.513248178Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/state_changes.py", line 137, in _go
  217. 2026-05-21T09:08:34.513255369Z ret_value = fn(self, *arg, **kw)
  218. 2026-05-21T09:08:34.513262394Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1286, in _prepare_impl
  219. 2026-05-21T09:08:34.513277440Z self.session.flush()
  220. 2026-05-21T09:08:34.513285532Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 4331, in flush
  221. 2026-05-21T09:08:34.513292983Z self._flush(objects)
  222. 2026-05-21T09:08:34.513300236Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 4466, in _flush
  223. 2026-05-21T09:08:34.513307792Z with util.safe_reraise():
  224. 2026-05-21T09:08:34.513314701Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 121, in __exit__
  225. 2026-05-21T09:08:34.513321969Z raise exc_value.with_traceback(exc_tb)
  226. 2026-05-21T09:08:34.513328960Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 4427, in _flush
  227. 2026-05-21T09:08:34.513336184Z flush_context.execute()
  228. 2026-05-21T09:08:34.513343115Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/unitofwork.py", line 466, in execute
  229. 2026-05-21T09:08:34.513350525Z rec.execute(self)
  230. 2026-05-21T09:08:34.513357563Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/unitofwork.py", line 642, in execute
  231. 2026-05-21T09:08:34.513364780Z util.preloaded.orm_persistence.save_obj(
  232. 2026-05-21T09:08:34.513371797Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/persistence.py", line 85, in save_obj
  233. 2026-05-21T09:08:34.513378973Z _emit_update_statements(
  234. 2026-05-21T09:08:34.513391698Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/persistence.py", line 912, in _emit_update_statements
  235. 2026-05-21T09:08:34.513400600Z c = connection.execute(
  236. 2026-05-21T09:08:34.513407663Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1419, in execute
  237. 2026-05-21T09:08:34.513414995Z return meth(
  238. 2026-05-21T09:08:34.513421930Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 527, in _execute_on_connection
  239. 2026-05-21T09:08:34.513429380Z return connection._execute_clauseelement(
  240. 2026-05-21T09:08:34.513436501Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1641, in _execute_clauseelement
  241. 2026-05-21T09:08:34.513455530Z ret = self._execute_context(
  242. 2026-05-21T09:08:34.513465756Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
  243. 2026-05-21T09:08:34.513473316Z return self._exec_single_context(
  244. 2026-05-21T09:08:34.513480323Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
  245. 2026-05-21T09:08:34.513487794Z self._handle_dbapi_exception(
  246. 2026-05-21T09:08:34.513494868Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2363, in _handle_dbapi_exception
  247. 2026-05-21T09:08:34.513502253Z raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  248. 2026-05-21T09:08:34.513509387Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
  249. 2026-05-21T09:08:34.513516656Z self.dialect.do_execute(
  250. 2026-05-21T09:08:34.513523654Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute
  251. 2026-05-21T09:08:34.513531049Z cursor.execute(statement, parameters)
  252. 2026-05-21T09:08:34.513538035Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 585, in execute
  253. 2026-05-21T09:08:34.513545273Z self._adapt_connection.await_(
  254. 2026-05-21T09:08:34.513552291Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 132, in await_only
  255. 2026-05-21T09:08:34.513559522Z return current.parent.switch(awaitable) # type: ignore[no-any-return,attr-defined] # noqa: E501
  256. 2026-05-21T09:08:34.513566685Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 196, in greenlet_spawn
  257. 2026-05-21T09:08:34.513574054Z value = await result
  258. 2026-05-21T09:08:34.513581065Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 563, in _prepare_and_execute
  259. 2026-05-21T09:08:34.513588392Z self._handle_exception(error)
  260. 2026-05-21T09:08:34.513595446Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 513, in _handle_exception
  261. 2026-05-21T09:08:34.513602792Z self._adapt_connection._handle_exception(error)
  262. 2026-05-21T09:08:34.513609841Z File "/usr/local/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 797, in _handle_exception
  263. 2026-05-21T09:08:34.513617181Z raise translated_error from error
  264. 2026-05-21T09:08:34.513624246Z sqlalchemy.exc.DBAPIError: (sqlalchemy.dialects.postgresql.asyncpg.Error) <class 'asyncpg.exceptions.DataError'>: invalid input for query argument $1: datetime.datetime(2026, 5, 21, 9, 8, 34,... (can't subtract offset-naive and offset-aware datetimes)
  265. 2026-05-21T09:08:34.513633139Z [SQL: UPDATE users SET updated_at=$1::TIMESTAMP WITHOUT TIME ZONE WHERE users.id = $2::VARCHAR]
  266. 2026-05-21T09:08:34.513640382Z [parameters: (datetime.datetime(2026, 5, 21, 9, 8, 34, 505088, tzinfo=datetime.timezone.utc), 'af827b1d-03b1-40dc-99b0-c8dca135a06e')]
  267. 2026-05-21T09:08:34.513656827Z (Background on this error at: https://sqlalche.me/e/20/dbapi)