Opened 11 years ago
Closed 11 years ago
#11139 closed defect (worksforme)
rescheduleTickets OperationalError: near ",": syntax error
Reported by: | Oscar Andreasson | Owned by: | Chris Nelson |
---|---|---|---|
Priority: | high | Component: | TracJsGanttPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: |
Description (last modified by )
Originally posted the issue in comment:10:ticket:11105, but realized this may be a separate issue.
This happens when I change for example blockedby and blocking custom fields. I have several fields that may contain trash data due to bad user input and no sanitation of user input in case this is of any help.
Disabling the ticketRescheduler component of the plugin fixes the error message, but I'm guessing there should be a permanent fix as well as this causing some kind of issues...? A part of the dump below:
Oops… Trac detected an internal error:
OperationalError: near ",": syntax error
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 creating a bug report.
Note that the Trac-jsGantt plugin seems to be involved. Please report this issue to the plugin maintainer.
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 or its plugins, please try the mailing list instead of creating a ticket.
Otherwise, please a new bug report describing the problem and explain how to reproduce it. Python Traceback
Most recent call last:
File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 522, in _dispatch_request File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 243, in dispatch File "/usr/local/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 169, in process_request File "/usr/local/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 541, in _process_ticket_request File "/usr/local/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 1238, in _do_save File "/usr/local/lib/python2.7/dist-packages/trac/ticket/model.py", line 359, in save_changes File "/usr/local/lib/python2.7/dist-packages/Trac_jsGantt-0.10_r12998-py2.7.egg/tracjsgantt/tracpm.py", line 2950, in ticket_changed File "/usr/local/lib/python2.7/dist-packages/Trac_jsGantt-0.10_r12998-py2.7.egg/tracjsgantt/tracpm.py", line 2910, in rescheduleTickets File "/usr/local/lib/python2.7/dist-packages/trac/db/util.py", line 65, in execute File "/usr/local/lib/python2.7/dist-packages/trac/db/sqlite_backend.py", line 78, in execute File "/usr/local/lib/python2.7/dist-packages/trac/db/sqlite_backend.py", line 56, in execute File "/usr/local/lib/python2.7/dist-packages/trac/db/sqlite_backend.py", line 48, in _rollback_on_error
Enabled Plugins:
graphviz | 0.7.6dev-r11263 | /usr/local/lib/python2.7/dist-packages/graphviz-0.7.6dev_r11263-py2.7.egg
|
IniAdmin | 0.2-r10454 | /usr/local/lib/python2.7/dist-packages/IniAdmin-0.2_r10454-py2.7.egg
|
Trac-jsGantt | 0.10-r12998 | /usr/local/lib/python2.7/dist-packages/Trac_jsGantt-0.10_r12998-py2.7.egg
|
trac-MultiRepoSearchPlugin | 0.2.1 | /usr/local/lib/python2.7/dist-packages/trac_MultiRepoSearchPlugin-0.2.1-py2.7.egg
|
TracDateField | 1.1.0-r11277 | /usr/local/lib/python2.7/dist-packages/TracDateField-1.1.0_r11277-py2.7.egg
|
TracMasterTickets | 3.0.2 | /usr/local/lib/python2.7/dist-packages/TracMasterTickets-3.0.2-py2.7.egg
|
TracWysiwyg | 0.12.0.4-r11158 | /usr/local/lib/python2.7/dist-packages/TracWysiwyg-0.12.0.4_r11158-py2.7.egg
|
Attachments (0)
Change History (7)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 11 years ago by
comment:4 Changed 11 years ago by
Thanks, they are updated. I'd love some input on the actual error however?
comment:5 Changed 11 years ago by
It seems as though a DB-specific issue was inserted though reviewing the code, it seems portable. I use PostgreSQL. You're clearly using SQLite.
It seems to me that:
valuesClause = ','.join(('(%s,%s,%s)',) * len(toInsert)) values = [] for t in tickets: if t['id'] in toInsert: values.append(t['id']) values.append(to_utimestamp(self.pm.start(t))) values.append(to_utimestamp(self.pm.finish(t))) cursor.execute('INSERT INTO schedule' + \ ' (ticket, start, finish)' + \ ' VALUES %s' % valuesClause, values)
is portable. .start()
and .finish()
can return None
, they are called here after rescheduling so that shouldn't be the case.
comment:6 Changed 11 years ago by
Can you tell me what version of Trac you are/were using? Is this still an issue for you? Can you try the latest plugin?
comment:7 Changed 11 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
With no more information available, I'm going to close this. Reopen if you have something to report. Thanks.
Unrelated, I'd suggest that you update IniAdminPlugin and MasterTicketsPlugin.