Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#7394 closed defect (invalid)

mastertickets plugin with postgres issue

Reported by: xiang.zhang Owned by:
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Noah Kantrowitz)

How to Reproduce

When create a new ticket, I get following errors. However the ticket was still created though.

Traceback (most recent call last):

File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/api.py", line 339, in send_error

'text/html')

File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/chrome.py", line 708, in render_template

if not req.session or not int(req.session.get('accesskeys', 0)):

File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/api.py", line 168, in getattr

value = self.callbacks[name](self)

File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 257, in _get_session

return Session(self.env, req)

File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/session.py", line 142, in init

self.get_session(req.authname, authenticated=True)

File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/session.py", line 156, in get_session

super(Session, self).get_session(sid, authenticated)

File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/session.py", line 56, in get_session

(sid, int(authenticated)))

File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/db/util.py", line 50, in execute

return self.cursor.execute(sql_escape_percent(sql), args)

File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/db/util.py", line 50, in execute

return self.cursor.execute(sql_escape_percent(sql), args)

InternalError: current transaction is aborted, commands ignored until end of transaction block

When I try to open a ticket, I got this. The issue only occur with postgres when mastertickets plugin enabled.

While doing a GET operation on /ticket/1, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'id': u'1'}

User Agent was: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061712 Fedora/3.0-1.fc9 Firefox/3.0

System Information

Trac 0.11
Python 2.5.1 (r251:54863, Apr 8 2008, 01:20:16)
[GCC 4.3.0 20080404 (Red Hat 4.3.0-6)]
setuptools 0.6c8
psycopg2 2.0.7
Genshi 0.5
mod_python 3.3.1
Pygments 0.10
Subversion 1.5.0 (r31699)
jQuery: 1.2.3

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 209, in dispatch
    self._post_process_request(req, *resp)
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 299, in _post_process_request
    resp = f.post_process_request(req, *resp)
  File "build/bdist.linux-i686/egg/mastertickets/web_ui.py", line 44, in post_process_request
    links = TicketLinks(self.env, tkt)
  File "build/bdist.linux-i686/egg/mastertickets/model.py", line 22, in __init__
    cursor.execute('SELECT dest FROM mastertickets WHERE source=%s ORDER BY dest', (self.tkt.id,))
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
ProgrammingError: operator does not exist: text = integer
LINE 1: SELECT dest FROM mastertickets WHERE source=1 ORDER BY dest
                                                   ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.


Attachments (0)

Change History (2)

comment:1 by Noah Kantrowitz, 16 years ago

Description: modified (diff)
Priority: highnormal
Resolution: invalid
Status: newclosed
Version: 0.11

This is an issue with the mastertickets plugin, not Trac itself. I need to update the plugin to work with 8.3's stricter type requirements. If there isn't a ticket open on trac-hacks.org, please copy this over there.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.