Hi @LeventeHunyadi --
It seems to be working a little better (I was able to sync a couple of tables successfully), but trying to init a new table gives this error now:
2023-03-30 11:33:24,655 - INFO - Downloading [object 4/4 - job b521df24-5222-4a14-95ff-7b2c76aa60cd] (downloader.py:97)
2023-03-30 11:33:32,002 - DEBUG - Inserting 224235 records from [object 2/4 - job b521df24-5222-4a14-95ff-7b2c76aa60cd] (db_operations.py:76)
Traceback (most recent call last):
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 770, in rollback
self.await_(self._transaction.rollback())
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 102, in await_only
return current.driver.switch(awaitable) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 160, in greenlet_spawn
value = await result
^^^^^^^^^^^^
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/asyncpg/transaction.py", line 219, in rollback
await self.__rollback()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/asyncpg/transaction.py", line 198, in __rollback
await self._connection.execute(query)
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/asyncpg/connection.py", line 317, in execute
return await self._protocol.query(query, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "asyncpg/protocol/protocol.pyx", line 323, in query
File "asyncpg/protocol/protocol.pyx", line 707, in asyncpg.protocol.protocol.BaseProtocol._check_state
asyncpg.exceptions._base.InterfaceError: cannot perform operation: another operation is in progress
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1116, in _rollback_impl
self.engine.dialect.do_rollback(self.connection)
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 657, in do_rollback
dbapi_connection.rollback()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 772, in rollback
self._handle_exception(error)
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 717, in _handle_exception
raise translated_error from error
sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.InterfaceError: <class 'asyncpg.exceptions._base.InterfaceError'>: cannot perform operation: another operation is in progress
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/cmurtaugh/.pyenv/versions/canvas-data-2/bin/dap", line 8, in <module>
sys.exit(console_entry())
^^^^^^^^^^^^^^^
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/dap/__main__.py", line 121, in console_entry
main()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/dap/__main__.py", line 115, in main
asyncio.run(dapCommand.execute(args))
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/dap/commands/commands.py", line 33, in execute
executed = await super().execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/dap/commands/base.py", line 49, in execute
if await subcommand.execute(args):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/dap/commands/base.py", line 45, in execute
await self._execute_impl(args)
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/dap/commands/initdb_command.py", line 31, in _execute_impl
await init_db(
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/dap/actions/init_db.py", line 14, in init_db
async with DatabaseConnection(connection_string) as db_connection:
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/ext/asyncio/engine.py", line 431, in close
await greenlet_spawn(self._proxied.close)
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 165, in greenlet_spawn
result = context.throw(*sys.exc_info())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1232, in close
self._transaction.close()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2559, in close
self._do_close()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2697, in _do_close
self._close_impl()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2683, in _close_impl
self._connection_rollback_impl()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2675, in _connection_rollback_impl
self.connection._rollback_impl()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1118, in _rollback_impl
self._handle_dbapi_exception(e, None, None, None, None)
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2326, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1116, in _rollback_impl
self.engine.dialect.do_rollback(self.connection)
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 657, in do_rollback
dbapi_connection.rollback()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 772, in rollback
self._handle_exception(error)
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 717, in _handle_exception
raise translated_error from error
sqlalchemy.exc.InterfaceError: (sqlalchemy.dialects.postgresql.asyncpg.InterfaceError) <class 'asyncpg.exceptions._base.InterfaceError'>: cannot perform operation: another operation is in progress
(Background on this error at: https://sqlalche.me/e/20/rvf5)
2023-03-30 11:33:32,301 - ERROR - Exception terminating connection <AdaptedConnection <asyncpg.connection.Connection object at 0x10769c4a0>> (base.py:384)
Traceback (most recent call last):
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 380, in _close_connection
self._dialect.do_terminate(connection)
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 984, in do_terminate
dbapi_connection.terminate()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 793, in terminate
self._connection.terminate()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/asyncpg/connection.py", line 1344, in terminate
self._abort()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/envs/canvas-data-2/lib/python3.11/site-packages/asyncpg/connection.py", line 1371, in _abort
self._protocol.abort()
File "asyncpg/protocol/protocol.pyx", line 569, in asyncpg.protocol.protocol.BaseProtocol.abort
File "asyncpg/protocol/protocol.pyx", line 668, in asyncpg.protocol.protocol.BaseProtocol._handle_waiter_on_connection_lost
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
self._check_closed()
File "/Users/cmurtaugh/.pyenv/versions/3.11.2/lib/python3.11/asyncio/base_events.py", line 519, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
2023-03-30 11:33:32,307 - ERROR - The garbage collector is trying to clean up non-checked-in connection <AdaptedConnection <asyncpg.connection.Connection object at 0x10769c4a0>>, which will be terminated. Please ensure that SQLAlchemy pooled connections are returned to the pool explicitly, either by calling ``close()`` or by using appropriate context managers to manage their lifecycle. (base.py:1036)
sys:1: SAWarning: The garbage collector is trying to clean up non-checked-in connection <AdaptedConnection <asyncpg.connection.Connection object at 0x10769c4a0>>, which will be terminated. Please ensure that SQLAlchemy pooled connections are returned to the pool explicitly, either by calling ``close()`` or by using appropriate context managers to manage their lifecycle.
--Colin