#21629 closed Cleanup/optimization (fixed)
Provide better pointers to mysql_tzinfo_to_sql for MySQL users
Reported by: | Aymeric Augustin | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The exception "ValueError: Database returned an invalid value in QuerySet.dates(). Are time zone definitions and pytz installed?" is quite hard to diagnose when users omitted to run mysql_tzinfo_to_sql.
Technically it says the right thing (time zone definitions aren't installed) but it's hard to locate the information, as it isn't in the MySQL installation docs nor in the time zone docs. I just spent a few minutes searching it in the docs, and I wrote these docs!
I suggest adding it to the time zone FAQ and to the MySQL installation instructions (at least).
Attachments (1)
Change History (10)
comment:1 by , 11 years ago
comment:3 by , 11 years ago
The anonymous has done exactly what this errors message is designed to prevent.
Documentation improvements are absolutely needed.
comment:4 by , 11 years ago
I agree that docs are needed, with a link to the relevant mysql docs. Do the other db require a similar treatment? I fixed the error message a while ago after hitting the problem with the test suite. Maybe the error message commit should be backported to stable as well?
MySQL docs: http://dev.mysql.com/doc/refman/5.5/en/mysql-tzinfo-to-sql.html
comment:5 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:6 by , 11 years ago
Has patch: | set |
---|
I backported the error message improvement and here's a draft patch.
by , 11 years ago
Attachment: | 21629.diff added |
---|
comment:8 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I've changed USE_TZ = TRUE by USE_TZ = False for solved this problem