Skip to content

TypeError while trying to initialize Gino db with MySQL #810

Description

@vicctorb2

TypeError while trying to initialize Gino db with MySQL

To Reproduce

fromgino_starletteimportGinoDATABASE_URL=f"mysql+aiomysql://{DATABASE_USER}:{DATABASE_PASSWORD}@{DATABASE_HOST}:{DATABASE_PORT}/{DATABASE_NAME}"db=Gino(
dsn=DATABASE_URL,
echo=True
)

Actual result

Cannot connect to the database; max retries reached.
ERROR: Traceback (most recent call last):
File "...projects/.../.venv39/lib/python3.9/site-packages/starlette/routing.py", line 621, in lifespan
async with self.lifespan_context(app):
File "...projects/.../.venv39/lib/python3.9/site-packages/starlette/routing.py", line 518, in __aenter__
await self._router.startup()
File "...projects/.../.venv39/lib/python3.9/site-packages/starlette/routing.py", line 598, in startup
await handler()
File "...projects/.../.venv39/lib/python3.9/site-packages/gino_starlette.py", line 177, in startup
await self.set_bind(
File "...projects/.../.venv39/lib/python3.9/site-packages/gino_starlette.py", line 226, in set_bind
return await super().set_bind(bind, loop=loop, **kwargs)
File "...projects/.../.venv39/lib/python3.9/site-packages/gino/api.py", line 427, in set_bind
bind = await create_engine(bind, loop=loop, bakery=self._bakery, **kwargs)
File "...projects/.../.venv39/lib/python3.9/site-packages/gino/strategies.py", line 68, in create
raise TypeError(
TypeError: Invalid argument(s) 'min_size','max_size' sent to create_engine(), using configuration AiomysqlDialect/GinoEngine. Please check that the keyword arguments are appropriate for this combination of components.

Environment:

  • GINO: 1.1.b2
  • Other: Python 3.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDescribes a bug in the system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions