Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
13 kB
3
Indexable
Never
INFO:     127.0.0.1:54626 - "GET /adcampaign/live HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3250, in _wrap_pool_connect
    return fn()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 310, in connect
    return _ConnectionFairy._checkout(self)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 868, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 476, in checkout
    rec = pool._do_get()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
    return self._create_connection()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 256, in _create_connection
    return _ConnectionRecord(self)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 371, in __init__
    self.__connect()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 666, in __connect
    pool.logger.debug("Error on connect(): %s", e)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
    raise exception
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 661, in __connect
    self.dbapi_connection = connection = pool._invoke_creator(self)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/engine/create.py", line 590, in connect
    return dialect.connect(*cargs, **cparams)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 597, in connect
    return self.dbapi.connect(*cargs, **cparams)
sqlite3.OperationalError: unable to open database file

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 366, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
    return await self.app(scope, receive, send)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/fastapi/applications.py", line 259, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/starlette/middleware/cors.py", line 84, in __call__
    await self.app(scope, receive, send)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 656, in __call__
    await route.handle(scope, receive, send)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 259, in handle
    await self.app(scope, receive, send)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 61, in app
    response = await func(request)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/fastapi/routing.py", line 227, in app
    raw_response = await run_endpoint_function(
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/fastapi/routing.py", line 162, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/anyio/to_thread.py", line 28, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(func, *args, cancellable=cancellable,
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 818, in run_sync_in_worker_thread
    return await future
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 754, in run
    result = context.run(func, *args)
  File "./app.py", line 49, in deco
    return f(*args, **kwargs)
  File "./app.py", line 179, in get_ad_campaigns_live
    ad_campaigns = db.get_live_ad_campaigns()
  File "./models/crud.py", line 82, in get_live_ad_campaigns
    ad_campaigns = self.exec(q).all()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlmodel/orm/session.py", line 60, in exec
    results = super().execute(
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1691, in execute
    conn = self._connection_for_bind(bind)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1532, in _connection_for_bind
    return self._transaction._connection_for_bind(
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 747, in _connection_for_bind
    conn = bind.connect()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/future/engine.py", line 406, in connect
    return super(Engine, self).connect()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3204, in connect
    return self._connection_cls(self, close_with_result=close_with_result)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 96, in __init__
    else engine.raw_connection()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3283, in raw_connection
    return self._wrap_pool_connect(self.pool.connect, _connection)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3253, in _wrap_pool_connect
    Connection._handle_dbapi_exception_noconnection(
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2100, in _handle_dbapi_exception_noconnection
    util.raise_(
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
    raise exception
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3250, in _wrap_pool_connect
    return fn()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 310, in connect
    return _ConnectionFairy._checkout(self)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 868, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 476, in checkout
    rec = pool._do_get()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
    return self._create_connection()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 256, in _create_connection
    return _ConnectionRecord(self)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 371, in __init__
    self.__connect()
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 666, in __connect
    pool.logger.debug("Error on connect(): %s", e)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
    raise exception
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 661, in __connect
    self.dbapi_connection = connection = pool._invoke_creator(self)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/engine/create.py", line 590, in connect
    return dialect.connect(*cargs, **cparams)
  File "/Users/ihorbrazhnichenko/Library/Caches/pypoetry/virtualenvs/backend-lyWhGKuc-py3.9/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 597, in connect
    return self.dbapi.connect(*cargs, **cparams)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/14/e3q8)