File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1936, in _exec_single_context
self.dialect.do_executemany(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 949, in do_executemany
cursor.executemany(statement, parameters)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 421, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 56, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\applications.py", line 1159, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\applications.py", line 90, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in __call__
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 660, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 680, in app
await route.handle(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 134, in app
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 120, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 674, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 330, in run_endpoint_function
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\concurrency.py", line 32, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\to_thread.py", line 63, in run_sync
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 2518, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 1002, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\api\routes.py", line 432, in knowledge_gaps
with session_scope(database_url) as session:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\contextlib.py", line 144, in __exit__
next(self.gen)
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\core\database\session.py", line 46, in session_scope
session.commit()
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 2030, in commit
trans.commit(_to_root=True)
File "<string>", line 2, in commit
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\state_changes.py", line 137, in _go
ret_value = fn(self, *arg, **kw)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 1311, in commit
self._prepare_impl()
File "<string>", line 2, in _prepare_impl
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\state_changes.py", line 137, in _go
ret_value = fn(self, *arg, **kw)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 1286, in _prepare_impl
self.session.flush()
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4331, in flush
self._flush(objects)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4466, in _flush
with util.safe_reraise():
^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\util\langhelpers.py", line 121, in __exit__
raise exc_value.with_traceback(exc_tb)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4427, in _flush
flush_context.execute()
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\unitofwork.py", line 466, in execute
rec.execute(self)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\unitofwork.py", line 642, in execute
util.preloaded.orm_persistence.save_obj(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\persistence.py", line 85, in save_obj
_emit_update_statements(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\persistence.py", line 912, in _emit_update_statements
c = connection.execute(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1419, in execute
return meth(
^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\sql\elements.py", line 527, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1641, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context
self._handle_dbapi_exception(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 2363, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1936, in _exec_single_context
self.dialect.do_executemany(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 949, in do_executemany
cursor.executemany(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: UPDATE knowledge_gaps SET updated_at=? WHERE knowledge_gaps.id = ?]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1936, in _exec_single_context
self.dialect.do_executemany(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 949, in do_executemany
cursor.executemany(statement, parameters)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 421, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 56, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\applications.py", line 1159, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\applications.py", line 90, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in __call__
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 660, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 680, in app
await route.handle(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 134, in app
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 120, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 674, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 330, in run_endpoint_function
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\concurrency.py", line 32, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\to_thread.py", line 63, in run_sync
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 2518, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 1002, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\api\routes.py", line 434, in knowledge_gaps
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\core\ontology\gap_detector.py", line 119, in _underconnected_entity_gaps
self._upsert_gap(
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\core\ontology\gap_detector.py", line 188, in _upsert_gap
self.session.flush()
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4331, in flush
self._flush(objects)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4466, in _flush
with util.safe_reraise():
^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\util\langhelpers.py", line 121, in __exit__
raise exc_value.with_traceback(exc_tb)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4427, in _flush
flush_context.execute()
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\unitofwork.py", line 466, in execute
rec.execute(self)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\unitofwork.py", line 642, in execute
util.preloaded.orm_persistence.save_obj(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\persistence.py", line 85, in save_obj
_emit_update_statements(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\persistence.py", line 912, in _emit_update_statements
c = connection.execute(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1419, in execute
return meth(
^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\sql\elements.py", line 527, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1641, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context
self._handle_dbapi_exception(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 2363, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1936, in _exec_single_context
self.dialect.do_executemany(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 949, in do_executemany
cursor.executemany(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: UPDATE knowledge_gaps SET updated_at=? WHERE knowledge_gaps.id = ?]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
C:\Users\lasta\MyProject\AI\crawler_platform\app\core\crawler\site_crawler.py:409: SAWarning: Identity map already had an identity for (<class 'crawler_platform.app.core.database.models.CrawlJob'>, (1,), None), replacing it with newly flushed object. Are there load operations occurring inside of an event handler within the flush?
self.repository.session.flush()
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 421, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 56, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\applications.py", line 1159, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\applications.py", line 90, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in __call__
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 660, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 680, in app
await route.handle(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 134, in app
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 120, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 674, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 330, in run_endpoint_function
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\concurrency.py", line 32, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\to_thread.py", line 63, in run_sync
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 2518, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 1002, in run
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\core\database\repository.py", line 113, in reset_project_runtime_data
.delete(synchronize_session=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\query.py", line 3217, in delete
self.session.execute(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 2351, in execute
return self._execute_internal(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 2249, in _execute_internal
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\bulk_persistence.py", line 2033, in orm_execute_statement
return super().orm_execute_statement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\context.py", line 306, in orm_execute_statement
result = conn.execute(
^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1419, in execute
return meth(
^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\sql\elements.py", line 527, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1641, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context
self._handle_dbapi_exception(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 2363, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: DELETE FROM feedback_logs WHERE feedback_logs.project_id = ?]
[parameters: (1,)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 421, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 56, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\applications.py", line 1159, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\applications.py", line 90, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in __call__
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 660, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 680, in app
await route.handle(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 134, in app
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 120, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 674, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 330, in run_endpoint_function
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\concurrency.py", line 32, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\to_thread.py", line 63, in run_sync
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 2518, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 1002, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\api\routes.py", line 327, in reset_project
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\core\database\repository.py", line 113, in reset_project_runtime_data
.delete(synchronize_session=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\query.py", line 3217, in delete
self.session.execute(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 2351, in execute
return self._execute_internal(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 2249, in _execute_internal
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\bulk_persistence.py", line 2033, in orm_execute_statement
return super().orm_execute_statement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\context.py", line 306, in orm_execute_statement
result = conn.execute(
^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1419, in execute
return meth(
^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\sql\elements.py", line 527, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1641, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context
self._handle_dbapi_exception(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 2363, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 952, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: DELETE FROM feedback_logs WHERE feedback_logs.project_id = ?]
[parameters: (1,)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1936, in _exec_single_context
self.dialect.do_executemany(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 949, in do_executemany
cursor.executemany(statement, parameters)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 421, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 56, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\applications.py", line 1159, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\applications.py", line 90, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in __call__
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 660, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 680, in app
await route.handle(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 134, in app
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 120, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 674, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 330, in run_endpoint_function
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\concurrency.py", line 32, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\to_thread.py", line 63, in run_sync
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 2518, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 1002, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\api\routes.py", line 434, in knowledge_gaps
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\core\ontology\gap_detector.py", line 119, in _underconnected_entity_gaps
self._upsert_gap(
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\core\ontology\gap_detector.py", line 188, in _upsert_gap
self.session.flush()
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4331, in flush
self._flush(objects)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4466, in _flush
with util.safe_reraise():
^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\util\langhelpers.py", line 121, in __exit__
raise exc_value.with_traceback(exc_tb)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4427, in _flush
flush_context.execute()
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\unitofwork.py", line 466, in execute
rec.execute(self)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\unitofwork.py", line 642, in execute
util.preloaded.orm_persistence.save_obj(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\persistence.py", line 85, in save_obj
_emit_update_statements(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\persistence.py", line 912, in _emit_update_statements
c = connection.execute(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1419, in execute
return meth(
^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\sql\elements.py", line 527, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1641, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context
self._handle_dbapi_exception(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 2363, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1936, in _exec_single_context
self.dialect.do_executemany(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 949, in do_executemany
cursor.executemany(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: UPDATE knowledge_gaps SET updated_at=? WHERE knowledge_gaps.id = ?]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1936, in _exec_single_context
self.dialect.do_executemany(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 949, in do_executemany
cursor.executemany(statement, parameters)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 421, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 56, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\applications.py", line 1159, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\applications.py", line 90, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in __call__
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 660, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 680, in app
await route.handle(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 134, in app
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 120, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 674, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\fastapi\routing.py", line 330, in run_endpoint_function
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\starlette\concurrency.py", line 32, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\to_thread.py", line 63, in run_sync
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 2518, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\anyio\_backends\_asyncio.py", line 1002, in run
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\core\ontology\gap_detector.py", line 119, in _underconnected_entity_gaps
self._upsert_gap(
File "C:\Users\lasta\MyProject\AI\crawler_platform\app\core\ontology\gap_detector.py", line 188, in _upsert_gap
self.session.flush()
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4331, in flush
self._flush(objects)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4466, in _flush
with util.safe_reraise():
^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\util\langhelpers.py", line 121, in __exit__
raise exc_value.with_traceback(exc_tb)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\session.py", line 4427, in _flush
flush_context.execute()
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\unitofwork.py", line 466, in execute
rec.execute(self)
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\unitofwork.py", line 642, in execute
util.preloaded.orm_persistence.save_obj(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\persistence.py", line 85, in save_obj
_emit_update_statements(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\orm\persistence.py", line 912, in _emit_update_statements
c = connection.execute(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1419, in execute
return meth(
^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\sql\elements.py", line 527, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1641, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context
self._handle_dbapi_exception(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 2363, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1936, in _exec_single_context
self.dialect.do_executemany(
File "C:\Users\lasta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\Lib\site-packages\sqlalchemy\engine\default.py", line 949, in do_executemany
cursor.executemany(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: UPDATE knowledge_gaps SET updated_at=? WHERE knowledge_gaps.id = ?]