[Django] #27105: Misleading error in ContentTypes get_for_model

5 views
Skip to first unread message

Django

unread,
Aug 22, 2016, 10:00:23 AM8/22/16
to django-...@googlegroups.com
#27105: Misleading error in ContentTypes get_for_model
--------------------------------------+--------------------
Reporter: andybak | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.contenttypes | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
This (line 75):

except (OperationalError, ProgrammingError, IntegrityError):

is gives the following message:

"Error creating new content types. Please make sure
contenttypes "
"is migrated before trying to migrate apps individually."

However - it's catching a much broader set of issues. I was baffled for a
while - my actual issue was that MySQL was unstable: "Lost connection to
MySQL server at 'reading initial communication packet" but I had to
disable the exception handling to figure that out.

We should probably examine the error inside the except block and narrow
down the range of cases that result in this message.

--
Ticket URL: <https://code.djangoproject.com/ticket/27105>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 22, 2016, 10:52:29 AM8/22/16
to django-...@googlegroups.com
#27105: Misleading error in ContentTypes get_for_model
-------------------------------------+-------------------------------------
Reporter: andybak | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: | Version: 1.9
contrib.contenttypes |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* needs_better_patch: => 0
* needs_tests: => 0
* version: 1.10 => 1.9
* type: Uncategorized => Cleanup/optimization
* needs_docs: => 0
* resolution: => fixed


Comment:

This is fixed in Django 1.10 by 61a16e02702fff4665969388f3b61af8cb1a20ae.

--
Ticket URL: <https://code.djangoproject.com/ticket/27105#comment:1>

Reply all
Reply to author
Forward
0 new messages