Description

Describe the bug...

Steps to reproduce

  1. When we try to copy any item, this error appears.

Example

Output Dump

sqlalchemy.exc.IntegrityError

IntegrityError: (IntegrityError) column name is not unique u'UPDATE item_table SET current=?, name=?, contenttype=?, acl=?, tags=? WHERE item_table.id = ?' (37, u'Sinha/IIIT/Prithvi', u'text/x.moin.wiki;charset=utf-8', '', u'||', 28)

Traceback (most recent call last)

  • File "/home/akash/moin2/env/lib/python2.7/site-packages/flask/app.py", line 889, in __call__

    return self.wsgi_app(environ, start_response)
  • File "/home/akash/moin2/env/lib/python2.7/site-packages/flask/app.py", line 879, in wsgi_app

    response = self.make_response(self.handle_exception(e))
  • File "/home/akash/moin2/env/lib/python2.7/site-packages/flask/app.py", line 876, in wsgi_app

    rv = self.dispatch_request()
  • File "/home/akash/moin2/env/lib/python2.7/site-packages/flask/app.py", line 695, in dispatch_request

    return self.view_functions[rule.endpoint](**req.view_args)
  • File "/home/akash/moin2/MoinMoin/apps/frontend/views.py", line 362, in copy_item

    item.copy(target, comment)
  • File "/home/akash/moin2/MoinMoin/items/__init__.py", line 378, in copy

    self._save(current_rev, current_rev, name=name, action=u'COPY', comment=comment)
  • File "/home/akash/moin2/MoinMoin/items/__init__.py", line 484, in _save

    storage_item.commit()
  • File "/home/akash/moin2/MoinMoin/storage/backends/indexing.py", line 120, in commit

    self.__unindexed_revision.update_index()
  • File "/home/akash/moin2/MoinMoin/storage/backends/indexing.py", line 188, in update_index

    self._index.add_rev(uuid, revno, metas)
  • File "/home/akash/moin2/MoinMoin/storage/backends/indexing.py", line 346, in add_rev

    self.cache_in_item(item_id, rev_id, metas)
  • File "/home/akash/moin2/MoinMoin/storage/backends/indexing.py", line 305, in cache_in_item

    tags=u'|' + u'|'.join(rev_metas.get(TAGS, [])) + u'|',
  • File "/home/akash/moin2/env/lib/python2.7/site-packages/sqlalchemy/sql/expression.py", line 2730, in execute

    return e._execute_clauseelement(self, multiparams, params)
  • File "/home/akash/moin2/env/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in _execute_clauseelement

    return connection._execute_clauseelement(elem, multiparams, params)
  • File "/home/akash/moin2/env/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1427, in _execute_clauseelement

    compiled_sql, distilled_params
  • File "/home/akash/moin2/env/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1535, in _execute_context

    context)
  • File "/home/akash/moin2/env/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1528, in _execute_context

    context)
  • File "/home/akash/moin2/env/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 325, in do_execute

    cursor.execute(statement, parameters)
IntegrityError: (IntegrityError) column name is not unique u'UPDATE item_table SET current=?, name=?, contenttype=?, acl=?, tags=? WHERE item_table.id = ?' (37, u'Sinha/IIIT/Prithvi', u'text/x.moin.wiki;charset=utf-8', '', u'||', 28)
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.

To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

  • dump() shows all variables in the frame
  • dump(obj) dumps all that's known about the object

IntegrityError.html

Component selection

Details

MoinMoin Version

2

OS and Version

Fedora 14

Python Version

2.7

Server Setup

Default

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Discussion

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/SqlAlchemyIntegrityError (last edited 2011-05-23 19:39:30 by AkashSinha)