Modify ↓
Opened 18 years ago
Closed 18 years ago
#3993 closed defect (fixed)
TypeError: unsupported operand type(s) for +: 'Undefined' and 'unicode'
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | report system | Version: | devel |
Severity: | trivial | Keywords: | report |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
How to Reproduce
While doing a GET operation on /report/1
, Trac issued an internal error.
System Information
Python | 2.4.3 (#1, Jul 23 2006, 16:24:25) [GCC 4.0.2 20051125 (Red Hat 4.0.2-8)] |
Subversion | 1.3.2
|
SQLite | 3.3.6
|
pysqlite | 2.3.2
|
Python Traceback
Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 377, in dispatch_request dispatcher.dispatch(req) File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 248, in dispatch content_type, data) File "/usr/local/lib/python2.4/site-packages/trac/web/chrome.py", line 483, in render_response return stream.render(method, doctype=doctype) File "build/bdist.linux-i686/egg/genshi/core.py", line 146, in render File "build/bdist.linux-i686/egg/genshi/output.py", line 200, in __call__ File "build/bdist.linux-i686/egg/genshi/output.py", line 488, in __call__ File "build/bdist.linux-i686/egg/genshi/output.py", line 436, in __call__ File "build/bdist.linux-i686/egg/genshi/core.py", line 207, in _ensure File "build/bdist.linux-i686/egg/genshi/filters.py", line 313, in __call__ File "build/bdist.linux-i686/egg/genshi/template.py", line 1111, in _match File "build/bdist.linux-i686/egg/genshi/filters.py", line 331, in __call__ File "build/bdist.linux-i686/egg/genshi/filters.py", line 313, in __call__ File "build/bdist.linux-i686/egg/genshi/template.py", line 1086, in _match File "build/bdist.linux-i686/egg/genshi/template.py", line 885, in _eval File "build/bdist.linux-i686/egg/genshi/template.py", line 895, in _eval File "build/bdist.linux-i686/egg/genshi/eval.py", line 95, in evaluate File "/usr/local/share/trac/templates/report_view.html", line 50, in <Expression u"row.__style__ and row_style+row.__style__+";""> <tr py:for="cell_group in row.cell_groups" TypeError: unsupported operand type(s) for +: 'Undefined' and 'unicode'
Query string
This is my query string.
SELECT p.value AS __color__, t.milestone|| ' 릴리즈' AS __group__, (CASE status WHEN 'closed' THEN 'color: #777; background: #ddd; border-color: #ccc;' ELSE (CASE owner WHEN '$USER' THEN 'font-weight: bold' END) END) AS __style__, id AS ticket, summary, component, status, resolution,version, t.type AS type, priority, owner, changetime AS modified, time AS _time,reporter AS _reporter FROM ticket t,enum p WHERE p.name=t.priority AND p.type='priority' ORDER BY (milestone IS NULL), milestone, (status = 'closed'), (CASE status WHEN 'closed' THEN modified ELSE (-1)*p.value END) DESC
Attachments (0)
Change History (4)
comment:1 by , 18 years ago
Owner: | changed from | to
---|
comment:2 by , 18 years ago
Hm, I guess it's simply a matter of removing it…
Can you please try this?
-
report_view.html
52 52 td_attrs = fullrow and {'class': 'fullrow', 'colspan': 100} or {}" 53 53 class="${row.__color__ and 'color'+row.__color__+'-' or ''}${row.__idx__ % 2 and 'odd' or 'even'}" 54 54 style="${row.__bgcolor__ and 'background: '+row.__bgcolor__+';' 55 }${row.__fgcolor__ and row_style+'color: '+row.__fgcolor__+';'56 }${row.__style__ and row _style+row.__style__+';'55 }${row.__fgcolor__ and 'color: '+row.__fgcolor__+';' 56 }${row.__style__ and row.__style__+';' 57 57 }${fullrow and ';border: none; padding: 0;' or ''}"> 58 58 59 59 <py:for each="cell in cell_group">
comment:4 by , 18 years ago
Resolution: | → fixed |
---|---|
Severity: | normal → trivial |
Status: | new → closed |
Patch applied in r4011.
Note:
See TracTickets
for help on using tickets.
Thanks for the report, that
row_style
must be something I forgot during the migration from Clearsilver.