When creating a ticket I get this: "Trac detected an internal error: IntegrityError: columns ticket, name are not unique"
Any ideas on how to get started on fixing things? Here is the info on the error page: This is probably a local installation issue. Found a bug in Trac? If you think this should work and you can reproduce the problem, you should consider reporting this to the Trac team. Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac, please try the mailing list instead of filing a ticket. Otherwise, please ==== How to Reproduce ==== While doing a POST operation on `/newticket`, Trac issued an internal error. ''(please provide additional details here)'' Request parameters: {{{ {'__FORM_TOKEN': u'30efe215075a40c4d9706f2e', 'field_blockedby': u'', 'field_blocking': u'', 'field_cc': u'', 'field_component': u'All', 'field_description': u'', 'field_estimatedhours': u'0', 'field_keywords': u'', 'field_milestone': u'Sprint 1: Studybeat 2010 Summer', 'field_owner': u'chris', 'field_priority': u'major', 'field_reporter': u'steve', 'field_summary': u'Track Embed / GA Funnel', 'field_totalhours': u'0', 'field_type': u'defect', 'submit': u'Create ticket'} }}} User Agent was: `Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3` ==== System Information ==== || '''Trac''' || `0.11.7` || || '''Python''' || `2.5.2 (r252:60911, Jan 20 2010, 23:34:32) ` [[br]] `[GCC 4.3.2]` || || '''setuptools''' || `0.6c9` || || '''SQLite''' || `3.5.9` || || '''pysqlite''' || `2.3.2` || || '''Genshi''' || `0.6dev-r1064` || || '''mod_python''' || `3.3.1` || || '''Bitten''' || `0.7dev-r776` || || '''Subversion''' || `1.5.1 (r32289)` || || '''RPC''' || `1.0.6` || || '''jQuery:''' || `1.2.6` || ==== Python Traceback ==== {{{ Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/ Trac-0.11.7-py2.5.egg/trac/web/main.py", line 450, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.5/ site-packages/Trac-0.11.7-py2.5.egg/trac/web/main.py", line 206, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/ python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/ticket/web_ui.py", line 183, in process_request return self._process_newticket_request(req) File "/usr/lib/python2.5/site- packages/Trac-0.11.7-py2.5.egg/trac/ticket/web_ui.py", line 399, in _process_newticket_request self._do_create(req, ticket) # (redirected if successful) File "/usr/lib/python2.5/site-packages/Trac-0.11.7- py2.5.egg/trac/ticket/web_ui.py", line 1000, in _do_create ticket.insert() File "/usr/lib/python2.5/site-packages/Trac-0.11.7- py2.5.egg/trac/ticket/model.py", line 205, in insert for name in custom_fields]) File "/usr/lib/python2.5/site-packages/Trac-0.11.7- py2.5.egg/trac/db/util.py", line 80, in executemany return self.cursor.executemany(sql_escape_percent(sql), args) File "/usr/lib/ python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/db/ sqlite_backend.py", line 64, in executemany args or []) File "/usr/lib/ python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/db/ sqlite_backend.py", line 51, in _rollback_on_error return function(self, *args, **kwargs) IntegrityError: columns ticket, name are not unique }}} a new ticket at the Trac project site, where you can describe the problem and explain how to reproduce it. Python Traceback Most recent call last: * File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/ trac/web/main.py", line 450, in _dispatch_request Code fragment: 445. try: 446. if not env and env_error: 447. raise HTTPInternalError(env_error) 448. try: 449. dispatcher = RequestDispatcher(env) 450. dispatcher.dispatch(req) 451. except RequestDone: 452. pass 453. resp = req._response or [] 454. 455. except HTTPException, e: Local variables: Name Value after [u' except RequestDone:', u' pass', u' resp = ... before [u' try:', u' if not env and env_error:', u' raise ... dispatcher <trac.web.main.RequestDispatcher object at 0xb94bba2c> e IntegrityError('columns ticket, name are not unique',) env <trac.env.Environment object at 0xb901812c> env_error None exc_info (<class 'sqlite3.IntegrityError'>, IntegrityError('columns ticket, name ... filename '/usr/lib/python2.5/site-packages/Trac-0.11.7- py2.5.egg/trac/web/main.py' frames [{'function': '_dispatch_request', 'lines_before': [u' try:', u' ... has_admin True line u' dispatcher.dispatch(req)' lineno 449 message u'IntegrityError: columns ticket, name are not unique' req <Request "POST u'/newticket'"> resp [] tb <traceback object at 0xb96b139c> tb_hide None traceback u'Traceback (most recent call last):\n File ... * File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/ trac/web/main.py", line 206, in dispatch Code fragment: 201. req.args.get('__FORM_TOKEN') != req.form_token: 202. raise HTTPBadRequest('Missing or invalid form token. ' 203. 'Do you have cookies enabled?') 204. 205. # Process the request and render the template 206. resp = chosen_handler.process_request(req) 207. if resp: 208. if len(resp) == 2: # Clearsilver 209. chrome.populate_hdf(req) 210. template, content_type = \ 211. self._post_process_request(req, *resp) Local variables: Name Value chosen_handler <trac.ticket.web_ui.TicketModule object at 0xb92d624c> chrome <trac.web.chrome.Chrome object at 0xb9607d0c> ctype 'application/x-www-form-urlencoded' err (<class 'sqlite3.IntegrityError'>, IntegrityError('columns ticket, name ... handler <trac.ticket.web_ui.TicketModule object at 0xb92d624c> options {} req <Request "POST u'/newticket'"> self <trac.web.main.RequestDispatcher object at 0xb94bba2c> * File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/ trac/ticket/web_ui.py", line 183, in process_request Code fragment: 178. def process_request(self, req): 179. if 'id' in req.args: 180. if req.path_info == '/newticket': 181. raise TracError(_("id can't be set for a new ticket request.")) 182. return self._process_ticket_request(req) 183. return self._process_newticket_request(req) 184. 185. # ITemplateProvider methods 186. 187. def get_htdocs_dirs(self): 188. return [] Local variables: Name Value req <Request "POST u'/newticket'"> self <trac.ticket.web_ui.TicketModule object at 0xb92d624c> * File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/ trac/ticket/web_ui.py", line 399, in _process_newticket_request Code fragment: 394. 395. valid = None 396. if req.method == 'POST' and not 'preview' in req.args: 397. valid = self._validate_ticket(req, ticket) 398. if valid: 399. self._do_create(req, ticket) # (redirected if successful) 400. # else fall through in a preview 401. req.args['preview'] = True 402. 403. # don't validate for new tickets and don't validate twice 404. if valid is None and 'preview' in req.args: Local variables: Name Value field_reporter 'field_reporter' plain_fields False reporter_id u'steve' req <Request "POST u'/newticket'"> self <trac.ticket.web_ui.TicketModule object at 0xb92d624c> ticket <trac.ticket.model.Ticket object at 0xb96373ac> valid True * File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/ trac/ticket/web_ui.py", line 1000, in _do_create Code fragment: 995. else: 996. add_warning(req, message) 997. return valid 998. 999. def _do_create(self, req, ticket): 1000. ticket.insert() 1001. 1002. # Notify 1003. try: 1004. tn = TicketNotifyEmail(self.env) 1005. tn.notify(ticket, newticket=True) Local variables: Name Value req <Request "POST u'/newticket'"> self <trac.ticket.web_ui.TicketModule object at 0xb92d624c> ticket <trac.ticket.model.Ticket object at 0xb96373ac> * File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/ trac/ticket/model.py", line 205, in insert Code fragment: 200. 201. # Insert custom fields 202. if custom_fields: 203. cursor.executemany("INSERT INTO ticket_custom (ticket,name,value) " 204. "VALUES (%s,%s,%s)", [(tkt_id, name, self[name]) 205. for name in custom_fields]) 206. if handle_ta: 207. db.commit() 208. 209. self.id = tkt_id 210. self.resource = self.resource(id=tkt_id) Local variables: Name Value changed 1275017846 created 1275017846 cursor <trac.db.util.IterableCursor object at 0xb96b8c8c> custom_fields [u'totalhours', u'blockedby', u'estimatedhours', u'blocking'] db <trac.db.pool.PooledConnection object at 0xb96b1374> f {'name': u'blocking', 'format': 'plain', 'label': u'Blocking', 'type': ... fname u'blocking' handle_ta True name u'blocking' self <trac.ticket.model.Ticket object at 0xb96373ac> std_fields ['summary', 'reporter', 'owner', 'description', 'type', 'status', ... tkt_id 88 when datetime.datetime(2010, 5, 28, 3, 37, 26, 890382, tzinfo=<FixedOffset ... * File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/ trac/db/util.py", line 80, in executemany Code fragment: 75. return self.cursor.execute(sql) 76. except Exception, e: 77. self.log.debug('executemany exception: %r', e) 78. raise 79. if args: 80. return self.cursor.executemany(sql_escape_percent(sql), args) 81. return self.cursor.executemany(sql) 82. 83. 84. class ConnectionWrapper(object): 85. """Generic wrapper around connection objects. Local variables: Name Value args [(88, u'totalhours', u'0'), (88, u'blockedby', u''), (88, ... self <trac.db.util.IterableCursor object at 0xb96b8c8c> sql 'INSERT INTO ticket_custom (ticket,name,value) VALUES (%s, %s,%s)' * File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/ trac/db/sqlite_backend.py", line 64, in executemany Code fragment: 59. args or []) 60. def executemany(self, sql, args=None): 61. if args: 62. sql = sql % (('?',) * len(args[0])) 63. return self._rollback_on_error(sqlite.Cursor.executemany, sql, 64. args or []) 65. 66. # EagerCursor taken from the example in pysqlite's repository: 67. # 68. # http://oss.itsystementwicklung.de/hg/pysqlite/raw-file/0a726720f540/misc/eager.py 69. # Local variables: Name Value args [(88, u'totalhours', u'0'), (88, u'blockedby', u''), (88, ... self <trac.db.sqlite_backend.EagerCursor object at 0xb95fbe6c> sql 'INSERT INTO ticket_custom (ticket,name,value) VALUES (?,?,?)' * File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/ trac/db/sqlite_backend.py", line 51, in _rollback_on_error Code fragment: 46. sqlite_version_string = '%d.%d.%d' % (_ver[0], _ver[1], int(_ver[2])) 47. 48. class PyFormatCursor(sqlite.Cursor): 49. def _rollback_on_error(self, function, *args, **kwargs): 50. try: 51. return function(self, *args, **kwargs) 52. except sqlite.DatabaseError, e: 53. self.cnx.rollback() 54. raise 55. def execute(self, sql, args=None): 56. if args: Local variables: Name Value args ('INSERT INTO ticket_custom (ticket,name,value) VALUES (?,?,?)', [(88, ... e IntegrityError('columns ticket, name are not unique',) function <method 'executemany' of 'sqlite3.Cursor' objects> kwargs {} self <trac.db.sqlite_backend.EagerCursor object at 0xb95fbe6c> File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/web/ main.py", line 450, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/web/ main.py", line 206, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/ ticket/web_ui.py", line 183, in process_request return self._process_newticket_request(req) File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/ ticket/web_ui.py", line 399, in _process_newticket_request self._do_create(req, ticket) # (redirected if successful) File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/ ticket/web_ui.py", line 1000, in _do_create ticket.insert() File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/ ticket/model.py", line 205, in insert for name in custom_fields]) File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/db/ util.py", line 80, in executemany return self.cursor.executemany(sql_escape_percent(sql), args) File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/db/ sqlite_backend.py", line 64, in executemany args or []) File "/usr/lib/python2.5/site-packages/Trac-0.11.7-py2.5.egg/trac/db/ sqlite_backend.py", line 51, in _rollback_on_error return function(self, *args, **kwargs) System Information: User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: 1.9.2.3) Gecko/20100401 Firefox/3.6.3 Trac: 0.11.7 Python: 2.5.2 (r252:60911, Jan 20 2010, 23:34:32) [GCC 4.3.2] setuptools: 0.6c9 SQLite: 3.5.9 pysqlite: 2.3.2 Genshi: 0.6dev-r1064 mod_python: 3.3.1 Bitten: 0.7dev-r776 Subversion: 1.5.1 (r32289) RPC: 1.0.6 jQuery: 1.2.6 -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-us...@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.