Modify

Opened 17 years ago

Closed 11 years ago

#2014 closed defect (wontfix)

Cannot move/copy tickets due to integer conversion error on Postgresql 8.1

Reported by: cbillen@… Owned by: Noah Kantrowitz
Priority: normal Component: DatamoverPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

Hi there, I'm trying to use Datamover to move all tickets from a trac site running PostgreSQL 8.1 database to a sqlite3 based trac project.

I'm getting the following traceback when I do that:

Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/var/lib/python-support/python2.5/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/TracWebAdmin-0.1.2dev_r5911-py2.5.egg/webadmin/web_ui.py", line 119, in process_request
    path_info)
  File "build/bdist.linux-i686/egg/datamover/ticket.py", line 64, in process_admin_request
    ids = [x['id'] for x in Query.from_string(self.env, query_string).execute(req)]
  File "/var/lib/python-support/python2.5/trac/ticket/query.py", line 158, in execute
    cursor.execute(sql, args)
  File "/var/lib/python-support/python2.5/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/var/lib/python-support/python2.5/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.5/site-packages/pyPgSQL/PgSQL.py", line 3111, in execute
    raise OperationalError, msg
OperationalError: ERROR:  invalid input syntax for integer: ""

I uncommented the print statement and it is having an issue with teh following sql statement:

SELECT t.id AS id,t.summary AS summary,t.owner AS owner,t.type AS type,t.status AS status,t.priority AS priority,t.milestone AS milestone,t.time AS time,t.changetime AS changetime,priority.value AS priority_value FROM ticket AS t LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND priority.name=priority) WHERE COALESCE(t.id,'')!=%s ORDER BY COALESCE(t.priority,'')='',priority.value,t.id

The offending command is the COALESCE(t.id,), I am not an expert but I think we need to have it changed to compare with an integer value or convert to string the t.id. My knowledge is limited in this arena however.

Thank you

Attachments (0)

Change History (1)

comment:1 Changed 11 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

This plugin is deprecated. Please use the TracMigratePlugin.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.