Skip to content

memsql-python doesn't work with newest mysqlclient #20

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

Closed
tomasz-at-nira opened this issue Feb 17, 2022 · 1 comment
Closed

memsql-python doesn't work with newest mysqlclient #20

tomasz-at-nira opened this issue Feb 17, 2022 · 1 comment

Comments

@tomasz-at-nira
Copy link

tomasz-at-nira commented Feb 17, 2022

Issue:
There has been a rename of parameters in connect() in mysqlclient
PyMySQL/mysqlclient#513

Installing latest memsql-python in a new python environment pulls latest mysqlclient. Code crashes.

Proposed solution:
Either patch memsql-python or freeze requirement for mysqlclient to use an older version.

Log:

/home/tomasz/.cache/pypoetry/virtualenvs/app-kIoj1aan-py3.8/bin/python /home/tomasz/Desktop/memstore/app/main.py
Traceback (most recent call last):
  File "/home/tomasz/Desktop/memstore/app/main.py", line 15, in <module>
    MemsqlConnector().test_connection()
  File "/home/tomasz/Desktop/memstore/app/mqmsql/connector.py", line 29, in test_connection
    with self.get_connection(db="information_schema") as conn:
  File "/home/tomasz/Desktop/memstore/app/mqmsql/connector.py", line 20, in get_connection
    return database.connect(
  File "/home/tomasz/.cache/pypoetry/virtualenvs/app-kIoj1aan-py3.8/lib/python3.8/site-packages/memsql/common/database.py", line 19, in connect
    return Connection(*args, **kwargs)
  File "/home/tomasz/.cache/pypoetry/virtualenvs/app-kIoj1aan-py3.8/lib/python3.8/site-packages/memsql/common/database.py", line 62, in __init__
    self.reconnect()
  File "/home/tomasz/.cache/pypoetry/virtualenvs/app-kIoj1aan-py3.8/lib/python3.8/site-packages/memsql/common/database.py", line 93, in reconnect
    conn = _mysql.connect(**self._db_args)
TypeError: 'db' is an invalid keyword argument for connect()

Process finished with exit code 1
@ngarg-panw
Copy link

+1 . I wasted 2 days figuring this out. Right now I manually updated 'db' to 'database' and 'passwd' to 'password' locally in database.py to unblock myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants