#26205: migrate and other commands fail with TypeError: 'NoneType' object has no
attribute '__getitem__' in schema.py
-------------------------------------+-------------------------------------
     Reporter:  mrkiwi-nz            |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Uncategorized        |                  Version:  1.9
     Severity:  Normal               |               Resolution:
     Keywords:  schema.py PRAGMA     |             Triage Stage:
  NonType migrate                    |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by mrkiwi-nz):

 Regarding not supporting 3.3.6, that's fair enough, but for anyone
 following even the most basic getting-started tutorials, the exception
 this throws is way beyond what a beginner should be expected to
 troubleshoot. Even knowing that it might be a back-end issue, or finding
 your version of sqlite3 is not obvious from the exception.
 My server (smeserver 8.2/centos 5.11) had been running django (various
 versions) for about 2 years fine until I upgraded to django 1.9.2 and
 nuked the db and tried to run migrations from scratch. I didn't even have
 sqlite3 installed, but  So I had to install sqlite3 to even find the
 version number of sqlite3.
 How about wrapping line 25 in a try: block to ensure a value is returned
 from "PRAGMA foreign_keys", or testing the sqlite version like other
 backends do (AFAIK) so that a helpful error message can be thrown (rather
 than ...NoneType' object has no attribute...)?

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.505ebf88a793400e6f5538936a5ddf5d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to