#10716 closed defect (fixed)
Internal Error when submitting a review
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | highest | Component: | CodeReviewerPlugin |
Severity: | critical | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description (last modified by )
Using Trac 1.0 via Apache (SSL) and PostgreSQL back-end, Python 2.7. Compiled source to python egg and installed as usual. Install seems to go well. However, when I try submit a peer review to an existing change set, I get a Trac error:
DataError: integer out of range
Here's the Trac log file output:
2012-12-18 16:13:43,621 Trac[main] ERROR: Internal Server Error: Traceback (most recent call last): File "c:\docume~1\svchou~1\locals~1\temp\easy_install-tyu9e_\Trac-1.0-py2.7-win32.egg.tmp\trac\web\main.py", line 497, in _dispatch_request dispatcher.dispatch(req) File "c:\docume~1\svchou~1\locals~1\temp\easy_install-tyu9e_\Trac-1.0-py2.7-win32.egg.tmp\trac\web\main.py", line 234, in dispatch req.send(output, content_type or 'text/html') File "c:\docume~1\svchou~1\locals~1\temp\easy_install-tyu9e_\Trac-1.0-py2.7-win32.egg.tmp\trac\web\api.py", line 486, in send self.write(content) File "c:\docume~1\svchou~1\locals~1\temp\easy_install-tyu9e_\Trac-1.0-py2.7-win32.egg.tmp\trac\web\api.py", line 608, in write self._write(data) IOError: failed to write data 2012-12-18 16:13:43,621 Trac[main] ERROR: Internal Server Error: Traceback (most recent call last): File "c:\docume~1\svchou~1\locals~1\temp\easy_install-tyu9e_\Trac-1.0-py2.7-win32.egg.tmp\trac\web\main.py", line 497, in _dispatch_request dispatcher.dispatch(req) File "c:\docume~1\svchou~1\locals~1\temp\easy_install-tyu9e_\Trac-1.0-py2.7-win32.egg.tmp\trac\web\main.py", line 234, in dispatch req.send(output, content_type or 'text/html') File "c:\docume~1\svchou~1\locals~1\temp\easy_install-tyu9e_\Trac-1.0-py2.7-win32.egg.tmp\trac\web\api.py", line 486, in send self.write(content) File "c:\docume~1\svchou~1\locals~1\temp\easy_install-tyu9e_\Trac-1.0-py2.7-win32.egg.tmp\trac\web\api.py", line 608, in write self._write(data) IOError: failed to write data
Attachments (0)
Change History (10)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 12 years ago by
Status: | new → assigned |
---|
Andy, so you know I have not yet tested this on Trac 1.0 nor Postgres nor python 2.7. Not that it shouldn't work - just never tested.
What version control system are you using? Also, are you using named repos in Trac (e..g, if you have multiple repos)?
comment:4 Changed 12 years ago by
We are using SVN (multiple named repos). I'm not a Python expert by any means but I've looked at your source code and I believe the issue may be on or about line 93 in model.py where you are doing a db insert:
cursor.execute(""" INSERT INTO codereviewer (repo,changeset,status,reviewer,summary,time) VALUES (%s, %s, %s, %s, %s, %s); """, (self.repo,self.changeset,status,reviewer,summary,when))
Based on the "index out of range" error I'm getting, the only piece of data in that SQL statement that is an integer type is the 'time' variable who's value is passed by 'when' . A few lines up you do this:
when = int(time.time() * self.EPOCH_MULTIPLIER)
Not sure if this is the issue or not but that's what I'm looking at right now.
comment:5 Changed 11 years ago by
This is due postgresql table schema problems, the codereview table is using a small integer data type... you can fix it with this:
alter table codereviewer alter COLUMN "time" type bigint;
comment:10 Changed 9 years ago by
Owner: | changed from Rob Guttman to Ryan J Ollos |
---|
More info. A closer look at the Trac log file indicates it may be an issue to the SQL backend in terms of unsupported escape characters: