You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
ImportError while importing test module '/build/source/tests/test_connection_options.py'.
Hint: make sure your test modules/packages have valid Python names.Traceback:
/nix/store/q6gfck5czr67090pwm53xrdyhpg6bx67-python3-3.8.9/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_connection_options.py:5: in <module>
from databases.backends.mysql import MySQLBackend
/nix/store/y9k80z54dx8ykbzn4f9jwzzhh9sm45hl-python3.8-databases-0.2.6/lib/python3.8/site-packages/databases/backends/mysql.py:6: in <module>
import aiomysql
/nix/store/v1vmdl62hh7d4rd9g6m6ibk34761dasc-python3.8-aiomysql-0.0.21/lib/python3.8/site-packages/aiomysql/__init__.py:32: in <module>
from .connection import Connection, connect
/nix/store/v1vmdl62hh7d4rd9g6m6ibk34761dasc-python3.8-aiomysql-0.0.21/lib/python3.8/site-packages/aiomysql/connection.py:19: in <module>
from pymysql.util import byte2int, int2byte
E ModuleNotFoundError: No module named 'pymysql.util'
I suggest switching from aiomysql to asyncmy for MySQL support. As noted in the SQLAlchemy documentation:
WARNING
The aiomysql dialect is not currently tested as part of SQLAlchemy’s continuous integration. As of September, 2021 the driver appears to be unmaintained and no longer functions for Python version 3.10, and additionally depends on a significantly outdated version of PyMySQL. Please refer to the asyncmy dialect for current MySQL/MariaDB asyncio functionality.
@aminalaee - If you would like me to try and put together a PR to replace aiomysql with asyncmy just let me know.
Activity
aminalaee commentedon Sep 12, 2021
@mweinelt You're right. But
aiomysqlrequires pymysql <= 1.0. How did you install that?gordthompson commentedon Oct 28, 2021
I suggest switching from aiomysql to asyncmy for MySQL support. As noted in the SQLAlchemy documentation:
@aminalaee - If you would like me to try and put together a PR to replace aiomysql with asyncmy just let me know.
aminalaee commentedon Oct 28, 2021
@gordthompson Thank you.
I've already created a PR #382 for that.
Feel free to review that.
Probably in the future we have to omit aiomysql too.
aminalaee commentedon Nov 24, 2021
We can close this for now, I think.