I'm getting this error when trying to add an attachment to a page:
Transaction managed block ended with pending COMMIT/ROLLBACK
The traceback is below. I can see you are doing something off with manual commits of transactions... I've never actually used django's transactions before though.
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/Practice/_plugin/attachments/
Django Version: 1.4
Python Version: 2.7.2
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.redirects',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.sitemaps',
'django.contrib.staticfiles',
'django.contrib.markup',
'django.contrib.humanize',
'storages',
'cms',
'mptt',
'menus',
'sekizai',
'cms.plugins.picture',
'cms.plugins.link',
'cms.plugins.file',
'cms.plugins.snippet',
'cms.plugins.teaser',
'cmsplugin_markup',
'registration',
'south',
'publications',
'research',
'categories',
'categories.editor',
'compressor',
'wiki',
'wiki.plugins.attachments',
'wiki.plugins.links',
'wiki.plugins.help',
'wiki.plugins.notifications',
'wikicitations',
'django_notify',
'overextends')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware')
Traceback:
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
-
response = callback(request, _callback_args, *_callback_kwargs)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/views/generic/base.py" in view
-
return self.dispatch(request, _args, *_kwargs)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
-
return bound_func(_args, *_kwargs)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/wiki/decorators.py" in wrapper
-
return func(request, article, _args, *_kwargs)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
-
return func(self, _args2, *_kwargs2)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/wiki/plugins/attachments/views.py" in dispatch
-
return super(AttachmentView, self).dispatch(request, article, _args, *_kwargs)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/wiki/views/mixins.py" in dispatch
-
return super(ArticleMixin, self).dispatch(request, _args, *_kwargs)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
-
return handler(request, _args, *_kwargs)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/views/generic/edit.py" in post
-
return self.form_valid(form)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/db/transaction.py" in inner
-
return func(_args, *_kwargs)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/db/transaction.py" in exit
-
self.exiting(exc_value, self.using)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/db/transaction.py" in exiting
-
leave_transaction_management(using=using)
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/db/transaction.py" in leave_transaction_management
-
connection.leave_transaction_management()
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/db/backends/init.py" in leave_transaction_management
-
raise TransactionManagementError("Transaction managed block ended with "
Exception Type: TransactionManagementError at /Practice/_plugin/attachments/
Exception Value: Transaction managed block ended with pending COMMIT/ROLLBACK