-
Notifications
You must be signed in to change notification settings - Fork 590
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
bug: UTC issue with MySQL backend #6010
Comments
|
Hi @ededovic 👋🏻! Thanks for the issue. To help us debug, are you using MariaDB or MySQL, or something else entirely? Our CI tests against MariaDB so we might have some unintentional assumptions that only apply to MariaDB. |
|
I'm using Percona 8.0.25-15, I think it is some kind of variant of MySQL. |
It's almost certainly unrelated to the version or even implentation of MySQL in this case and more likely that time zone tables in the database aren't populated. There's not much we can do about a timezone-impoverished setup, except to avoid failing when setting the session time zone. I can put up a PR to catch the exception and show a warning when this happens. |
|
Just in case a 5.1.1 release may happen before 6.0.0, I would note that older versions of ibis would not throw an error here. On ibis 4.10 I can connect to ensembl's databases like: connection = ibis.mysql.connect("martdb.ensembl.org", user="anonymous", database="ensembl_compara_109")But this fails on ibis 5.1.0 with the time zone error. |
|
There won't be a 5.1.1 release before 6.0.0. Can you provide a reproducible example using a non-proprietary database? It would also be helpful to know the difference in environments between your testing on 4.1 and 5.1. Are you seeing warnings on 4.1 and no failure, or are you actually successfully setting the timezone? Nothing much about the code around setting the timezone has changed between 4.1 and 5.1 changed IIRC. |
I don't believe the ensembl databases are proprietary, the data should be freely available. Is this what you meant?
These were fresh installs in conda environments. ibis 5.1.0 environmentibis 4.1.0 environment
I get a UserWarning when I execute a query: |
|
Yep, okay thanks for the information! I think my previous comment explains what you were seeing. |
|
Hi! I'm a new user of ibis. I encounter the same error when using the latest version (ibis-mysql) 6.1.0 despite you said the team has fixed it. I also tried 6.0.0 and 5.1.0. However, when I downgrade to 4.1.0, I only receive a warning. |
|
@soxv Can you open a new bug report issue with the details of how the problem is manifesting? |
## Description of changes When trying to connect to a mySQL backend, the following error can appear: ``` OperationalError: (pymysql.err.OperationalError) (1298, "Unknown or incorrect time zone: 'UTC'") (Background on this error at: https://sqlalche.me/e/20/e3q8) ``` This is due to an exception generated by PyMySQL. The exception, formerly generated by SQLAlchemy was already caught by Ibis since #6010, this PR adds a catching of the PyMySQL exception. ## Issues closed Resolves #7918
What happened?
when trying to connect to
ibis.mysql.connect(host='...', user='...',password='...', database='...'), I get this error:coming from here:
when I change it to SYSTEM, it works:
What version of ibis are you using?
5.1
What backend(s) are you using, if any?
mysql
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: