affects bundlebuggy
Adding a new voter with the same username as an existing voter gives a
traceback:
Traceback (most recent call last):
File "/usr/local/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py", line 121, in _run
self.main()
File "/usr/local/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py", line 264, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in default
File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.4.3-py2.5.egg/turbogears/controllers.py", line 363, in expose
*args, **kw)
File "<string>", line 5, in run_with_transaction
File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.4.3-py2.5.egg/turbogears/database.py", line 412, in sa_rwt
req.sa_transaction.commit()
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/scoping.py", line 74, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/session.py", line 483, in commit
self.transaction = self.transaction.commit()
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/session.py", line 210, in commit
self.session.flush()
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/session.py", line 683, in flush
self.uow.flush(self, objects)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 209, in flush
flush_context.execute()
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 436, in execute
UOWExecutor().execute(self, head)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 1055, in execute
self.execute_save_steps(trans, task)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 1074, in execute_save_steps
self.execute_childtasks(trans, task, False)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 1092, in execute_childtasks
self.execute(trans, child, isdelete)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 1055, in execute
self.execute_save_steps(trans, task)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 1074, in execute_save_steps
self.execute_childtasks(trans, task, False)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 1092, in execute_childtasks
self.execute(trans, child, isdelete)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 1055, in execute
self.execute_save_steps(trans, task)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 1069, in execute_save_steps
self.save_objects(trans, task)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 1060, in save_objects
task.mapper.save_obj(task.polymorphic_tosave_objects, trans)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/orm/mapper.py", line 1132, in save_obj
c = connection.execute(statement.values(value_params), params)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/engine/base.py", line 789, in execute
return Connection.executors[c](self, object, multiparams, params)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/engine/base.py", line 840, in execute_clauseelement
return self._execute_compiled(elem.compile(dialect=self.dialect, column_keys=keys, inline=len(params) > 1), distilled_params=params)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/engine/base.py", line 852, in _execute_compiled
self.__execute_raw(context)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/engine/base.py", line 864, in __execute_raw
self._cursor_execute(context.cursor, context.statement, context.parameters[0], context=context)
File "/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/sqlalchemy/engine/base.py", line 880, in _cursor_execute
raise exceptions.DBAPIError.instance(statement, parameters, e)
IntegrityError: ('(IntegrityError) duplicate key violates unique constraint "tg_user_user_name_key"\n', <bound method Root.default of <bundlebuggy.controllers.Root object at 0x8f08c6c>>) 'INSERT INTO tg_user (user_id, user_name, email_address, display_name, password, created) VALUES (%(user_id)s, %(user_name)s, %(email_address)s, %(display_name)s, %(password)s, %(created)s)' {'user_id': 19L, 'created': datetime.datetime(2008, 7, 17, 7, 25, 42, 786158), 'user_name': 'vila', 'display_name': 'Vincent Ladeuil', 'password': '', 'email_address': None}
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jelmer Vernooij wrote:
> Public bug reported:
>
> affects bundlebuggy
>
> Adding a new voter with the same username as an existing voter gives a
> traceback:
It shouldn't give a traceback, but the problem is that Vincent is using
a different email id; Bundle Buggy recognizes
"Vincent Ladeuil <email address hidden>".
Aaron enigmail. mozdev. org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iD8DBQFIfzQl0F+ nu1YWqI0RAvF1AJ 42cypTgqbPd+ nQ6rBWpkZg4hGBY gCaA9NC 3vkWTzsc=
c+NR8VT0iZ5W2Bu
=m+RD
-----END PGP SIGNATURE-----