Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError while trying to initialize Gino db with MySQL #810

Open
vicctorb2 opened this issue Apr 20, 2022 · 0 comments
Open

TypeError while trying to initialize Gino db with MySQL #810

vicctorb2 opened this issue Apr 20, 2022 · 0 comments
Labels
bug Describes a bug in the system.

Comments

@vicctorb2
Copy link

vicctorb2 commented Apr 20, 2022

TypeError while trying to initialize Gino db with MySQL

To Reproduce

from gino_starlette import Gino
DATABASE_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
@vicctorb2 vicctorb2 added the bug Describes a bug in the system. label Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Describes a bug in the system.
Projects
None yet
Development

No branches or pull requests

1 participant