When running the following code:
import urllib.parse
from sqlalchemy import text
from sqlalchemy.ext.asyncio import create_async_engine
firebolt_client_id = None
firebolt_secret = "..."
db_name = "..."
account_name = "..."
engine_name = "..."
secret = urllib.parse.quote_plus(firebolt_secret)
url = (
f"asyncio+firebolt://{firebolt_client_id}:{secret}@{db_name}/"
f"{engine_name}?account_name={account_name}"
)
async def main():
engine = create_async_engine(url)
async with engine.connect() as conn:
await conn.execute(text("SELECT 1;"))
if __name__ == "__main__":
import asyncio
asyncio.run(main())
I will get this error:
TypeError: trio.run received unrecognized yield message None. Are you trying to use a library written for some other framework like asyncio? That won't work without some kind of compatibility shim.
I guess this comes from the internal firebolt-sdk package but somehow I was only able to replicate this error on the sqlalchemy's API.
It was quite hard for me to find out what the real cause of the error was and I eventually realized that it is cause by firebolt_client_id being None. It would be nice to get this error caught earlier with a more specific error message.
When running the following code:
I will get this error:
I guess this comes from the internal
firebolt-sdkpackage but somehow I was only able to replicate this error on the sqlalchemy's API.It was quite hard for me to find out what the real cause of the error was and I eventually realized that it is cause by
firebolt_client_idbeingNone. It would be nice to get this error caught earlier with a more specific error message.