Re: [Django] #26205: migrate and other commands fail with TypeError: 'NoneType' object has no attribute '__getitem__' in schema.py

2016-06-20 Thread Django
#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:  closed
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  needsinfo
 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):

 Replying to [comment:4 timgraham]:
 > Where do you encounter this old version of SQLite? Django only supports
 the latest point release of each major version of Python, so if this is
 with an older point release, I don't think additional documentation is
 necessary.

 Tim: This occurs on SME 8.1, which is based on CentOS 5.10
 [https://wiki.contribs.org/SME_Server:8.1]
 These packages are currently available in the standard repo:

 {{{
 python-sqlite-1.1.7-1.2.1.0
 sqlite-3.3.6-7
 sqlite-devel-3.3.6-7
 }}}

--
Ticket URL: 
Django 
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.d63a1cc1f0fc914a6a9412d0ffcc8bb1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26205: migrate and other commands fail with TypeError: 'NoneType' object has no attribute '__getitem__' in schema.py

2016-02-12 Thread Django
#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:  closed
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  needsinfo
 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
-+-
Changes (by timgraham):

 * status:  new => closed
 * component:  Uncategorized => Database layer (models, ORM)
 * resolution:   => needsinfo


--
Ticket URL: 
Django 
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.f7e316d21610591515eaefd1c57d0e82%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26205: migrate and other commands fail with TypeError: 'NoneType' object has no attribute '__getitem__' in schema.py

2016-02-11 Thread Django
#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 timgraham):

 Where do you encounter this old version of SQLite? Django only supports
 the latest point release of each major version of Python, so if this is
 with an older point release, I don't think additional documentation is
 necessary.

--
Ticket URL: 
Django 
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.f1e4615dff93709cc4cdbb8d06b24f23%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26205: migrate and other commands fail with TypeError: 'NoneType' object has no attribute '__getitem__' in schema.py

2016-02-10 Thread Django
#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 claudep):

 Django uses pysqlite2 if it is installed, but most often it falls back to
 the sqlite3 integrated module.

 On Python 2.7:
 {{{
 $ python2
 Python 2.7.9 (default, Mar  1 2015, 12:57:24)
 [GCC 4.9.2] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import sqlite3
 >>> sqlite3.sqlite_version
 '3.8.7.1'
 }}}

--
Ticket URL: 
Django 
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.4c55cb69b00b6f54538f09507b232a76%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26205: migrate and other commands fail with TypeError: 'NoneType' object has no attribute '__getitem__' in schema.py

2016-02-10 Thread Django
#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: 
Django 
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.


Re: [Django] #26205: migrate and other commands fail with TypeError: 'NoneType' object has no attribute '__getitem__' in schema.py

2016-02-10 Thread Django
#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
-+-
Changes (by charettes):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 While we don't document a minimum sqlite3 version I don't think we should
 commit to support a version that is almost
 [https://www.sqlite.org/changes.html#version_3_3_6 10 years old].

 I suggest we document a minimal supported version like we do with other
 backends.

--
Ticket URL: 
Django 
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.06fb02ff1708f3b1e8bdfb1aa55febbf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #26205: migrate and other commands fail with TypeError: 'NoneType' object has no attribute '__getitem__' in schema.py

2016-02-10 Thread Django
#26205: migrate and other commands fail with TypeError: 'NoneType' object has no
attribute '__getitem__' in schema.py
+--
 Reporter:  mrkiwi-nz   |  Owner:  nobody
 Type:  | Status:  new
  Uncategorized |
Component:  |Version:  1.9
  Uncategorized |
 Severity:  Normal  |   Keywords:  schema.py PRAGMA NonType migrate
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0   |  UI/UX:  0
+--
 Only occurs with a sqlite engine where the command "PRAGMA foreign_keys"
 returns nothing (instead of returning 0 or 1).
 This happens (at least) on sqlite3 v 3.3.6. Doesn't occur on 3.8.11.

 The net effect is that the following manage.py comands fail;
 migrate
 makemigrations
 test
 plus other commands if they trigger a migration.

 Changing line 25 of django/db/backends/sqlite3/schema.py from this;
 {{{
 self._initial_pragma_fk = c.fetchone()[0]
 }}}
 to this
 {{{
 self._initial_pragma_fk = 0  # c.fetchone()[0]
 }}}
 enables you to proceed with the migration.

--
Ticket URL: 
Django 
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/052.40b46f248a19e1ef624e2fdb176cb73b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.