Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#11396 closed (wontfix)

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

Reported by: krubo Owned by: nobody
Component: Uncategorized Version: dev
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 (4)

comment:1 by krubo, 16 years ago

Version: 1.0SVN

comment:2 by Gary Wilson, 15 years ago

Resolution: wontfix
Status: newclosed

Python 2.3 support is being dropped in the 1.2 release. If anyone has a patch that fixes this, then please reopen as we will still support Python 2.3 bug fixes for the 1.0.X branch.

in reply to:  2 comment:3 by James Bennett, 15 years ago

Replying to gwilson:

Python 2.3 support is being dropped in the 1.2 release. If anyone has a patch that fixes this, then please reopen as we will still support Python 2.3 bug fixes for the 1.0.X branch.

Slightly incorrect: we still support security-related bugfixes for 1.0.X, but not general bug-fixing.

comment:4 by Alex Gaynor, 15 years ago

I think Gary just meant s/1.0.X/1.1.X

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