Malavika S Menon

09/30/2022, 10:06 AM
Traceback (most recent call last):
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/", line 442, in _prepare_and_execute
    self._rows = await prepared_stmt.fetch(*parameters)
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/asyncpg/", line 176, in fetch
    data = await self.__bind_execute(args, 0, timeout)
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/asyncpg/", line 241, in __bind_execute
    data, status, _ = await self.__do_execute(
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/asyncpg/", line 230, in __do_execute
    return await executor(protocol)
  File "asyncpg/protocol/protocol.pyx", line 201, in bind_execute
asyncpg.exceptions.ActiveSQLTransactionError: ALTER TYPE ... ADD cannot run inside a transaction block
Coming across this error while trying to run a prefect agent and orion. Has anyone come across this before?

Bianca Hoch

09/30/2022, 3:14 PM
Hi Malavika, can you tell us a bit more about your setup? Where is the agent running? What version of prefect are you using?

Malavika S Menon

09/30/2022, 6:21 PM
I was using Prefect 2.3.4, was trying to run the command
prefect orion start
through the command line. Was running in a virtualenv with SQLAlchemy==1.4.40, asyncpg=0.26.0, postgres server = 9.5