Opened 15 years ago

Closed 15 years ago

#11395 closed (duplicate)

"manage.py syncdb" raises OperationalError with pysqlite2 on Python 2.3.5

Reported by: krubo Owned by: nobody
Component: Uncategorized Version: 1.0
Severity: Keywords: pysqlite2 unfinalised
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

$ python manage.py syncdb
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_admin_log
Creating table isss_event
Creating table isss_navlink
Creating table junk_evaluationscheme
Creating table junk_evaluation
Creating table junk_evaluationquestion
Creating table junk_evaluationanswer

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): no
Installing index for auth.Permission model
Installing index for auth.Message model
Installing index for admin.LogEntry model
Installing index for junk.Evaluation model
Installing index for junk.EvaluationQuestion model
Installing index for junk.EvaluationAnswer model
Traceback (most recent call last):
  File "manage.py", line 11, in ?
    execute_manager(settings)
  File "/home/dex/pythonpath/django/core/management/__init__.py", line 362, in execute_manager
    utility.execute()
  File "/home/dex/pythonpath/django/core/management/__init__.py", line 303, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/dex/pythonpath/django/core/management/base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/dex/pythonpath/django/core/management/base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/home/dex/pythonpath/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/home/dex/pythonpath/django/core/management/commands/syncdb.py", line 150, in handle_noargs
    call_command('loaddata', 'initial_data', verbosity=verbosity)
  File "/home/dex/pythonpath/django/core/management/__init__.py", line 166, in call_command
    return klass.execute(*args, **defaults)
  File "/home/dex/pythonpath/django/core/management/base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/home/dex/pythonpath/django/core/management/commands/loaddata.py", line 216, in handle
    connection.close()
  File "/home/dex/pythonpath/django/db/backends/sqlite3/base.py", line 183, in close
    BaseDatabaseWrapper.close(self)
  File "/home/dex/pythonpath/django/db/backends/__init__.py", line 76, in close
    self.connection.close()
pysqlite2.dbapi2.OperationalError: Unable to close due to unfinalised statements

On my particular setup (Dreamhost), the problem is fixed if I get rid of the patch for #7572 by removing the last two lines of /django/core/management/commands/loaddata.py. This problem seems similar to #882, but adding cursor.close() to the problem lines didn't seem to fix it.

Change History (1)

comment:1 by krubo, 15 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #11396. Sorry.

Note: See TracTickets for help on using tickets.
Back to Top