question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug with latest `mysql-connector-python` (version 8.0.30)

See original GitHub issue

Was having issues with the MySQL connector on the latest version image

Had to manually downgrade it to 8.0.29 image

It might be better to add some lower/upper boundaries in the pyproject.toml of data-diff

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
geo909commented, Oct 21, 2022

@erezsh Sorry for ressurecting this, but I’m hitting the same wall here.

I’m using MySQL 5.7.23 (AWS rds) and data-diff 0.3.0rc1 and when I run this:

from data_diff import connect_to_table

user = "xxxxxxxx"
password = "xxxxxxxxxxxxxxxxx"
database = "xxxxxxxxxxxxxxxx" 
hostname = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.rds.amazonaws.com"
db_info = f"mysql://{user}:{password}@{hostname}/{database}"

table = connect_to_table(
    db_info,
    table_name="mytable", 
)

print(table.count())

I get something like:

mysql://xxxxx:xxxxxxxxx@xxxxxxxxxxxxxx.rds.amazonaws.com/xxxxxxxxxxxx
INFO:database:[MySQL] Starting a threadpool, size=1.
DEBUG:google.auth._default:Checking None for explicit credentials as part of auth process...
DEBUG:google.auth._default:Checking Cloud SDK credentials as part of auth process...
DEBUG:database:Running SQL (MySQL): SELECT count(*) FROM `mytable`
CRITICAL:concurrent.futures:Exception in initializer:
Traceback (most recent call last):
  File "/home/xxxxxxxx", line 54, in create_connection
    return mysql.connect(charset="utf8", use_unicode=True, **self._args)
  File "/home/xxxxxxxx/.pyenv/versions/data-diff-3.10.6/lib/python3.10/site-packages/mysql/connector/pooling.py", line 286, in connect
    return CMySQLConnection(*args, **kwargs)
  File "/home/xxxxxxxxxx/.pyenv/versions/data-diff-3.10.6/lib/python3.10/site-packages/mysql/connector/connection_cext.py", line 101, in __init__
    self.connect(**kwargs)
  File "/home/xxxxxxxxxx/.pyenv/versions/data-diff-3.10.6/lib/python3.10/site-packages/mysql/connector/abstracts.py", line 1112, in connect
    self._post_connection()
  File "/home/xxxxxxxxxx/.pyenv/versions/data-diff-3.10.6/lib/python3.10/site-packages/mysql/connector/abstracts.py", line 1084, in _post_connection
    self.set_charset_collation(self._charset_id)
  File "/home/xxxxxxxxxx/.pyenv/versions/data-diff-3.10.6/lib/python3.10/site-packages/mysql/connector/abstracts.py", line 1022, in set_charset_collation
    ) = CharacterSet.get_charset_info(charset)
  File "/home/xxxxxxxxxx/.pyenv/versions/data-diff-3.10.6/lib/python3.10/site-packages/mysql/connector/constants.py", line 775, in get_charset_info
    info = cls.get_default_collation(charset)
  File "/home/xxxxxxxxxx/.pyenv/versions/data-diff-3.10.6/lib/python3.10/site-packages/mysql/connector/constants.py", line 746, in get_default_collation
    raise ProgrammingError(f"Character set '{charset}' unsupported")
mysql.connector.errors.ProgrammingError: Character set '255' unsupported

Things that worked for me:

I’m a bit lost, since I cannot find a way to open an issue with mysql-connector-python, neither am I sure it is their issue, I’m not a developer and I find it kind of hard to navigate the code. @pawandubey links to a comment about it but I’m not sure how to proceed.

Is there something we can do?

0reactions
erezshcommented, Sep 20, 2022

Closed due to inactivity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changes in MySQL Connector/Python 8.0.30 (2022-07-26 ...
Bugs Fixed · No longer allow empty strings ("") in the collection fields used in methods like set() that are chained with modify()....
Read more >
2.4 Changes in MySQL Connector/Python 8.0.29 (2022-04-26 ...
Connector /Python's c-extension implementation now supports FIDO Pluggable Authentication, and adds a new fido_callback connection option.
Read more >
mysql-connector-python - PyPI
mysql -connector-python 8.0.31. pip install mysql-connector-python. Copy PIP instructions. Latest version. Released: Oct ...
Read more >
MySQL Connector/Python - GitHub
Make sure you have a recent pip version installed on your system. If your system already has pip installed, you might need to...
Read more >
FreshPorts -- databases/py-mysql-connector-python
MySQL driver written in Python which does not depend on MySQL C client libraries and ... databases/py-mysql-connector-python: Update version 8.0.30=>8.0.31 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found