Sunday, April 30, 2017

Re: Django Tutorial | sqlmigrate command ending in error

Can anyone kindly help me on this issue?

Thanks,
Nikhil

On Friday, 21 April 2017 18:40:43 UTC+5:30, Nikhil Reddy wrote:
Hi,

I am going through this tutorial. When I execute the command: "python manage.py sqlmigrate polls 0001" it is ending in below error.
Please help resolve the issue.

Error:
Traceback (most recent call last):    File "manage.py", line 22, in <module>      execute_from_command_line(sys.argv)    File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line      utility.execute()    File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/__init__.py", line 355, in execute      self.fetch_command(subcommand).run_from_argv(self.argv)    File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv      self.execute(*args, **cmd_options)    File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/commands/sqlmigrate.py", line 33, in execute      return super(Command, self).execute(*args, **options)    File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute      output = self.handle(*args, **options)    File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/core/management/commands/sqlmigrate.py", line 62, in handle      sql_statements = executor.collect_sql(plan)    File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/db/migrations/executor.py", line 219, in collect_sql      with self.connection.schema_editor(collect_sql=True, atomic=migration.atomic) as schema_editor:    File "/scratch/njakkula/NJ/py_Oracle/bugdb/triage/lib/python2.7/site-packages/django/db/backends/sqlite3/schema.py", line 25, in __enter__      self._initial_pragma_fk = c.fetchone()[0]  TypeError: 'NoneType' object has no attribute '__getitem__'  

Versions:
Python 2.7.13
Django 1.11
sqlite3 2.6.0

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c2854687-dced-4527-90e9-2c0de618b92e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment