You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by Apache Bloodhound <bl...@incubator.apache.org> on 2013/02/06 02:25:58 UTC
[Apache Bloodhound] #366: TypeError: unsupported operand type(s)
for -: 'str' and 'int'
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
-------------------------------+--------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone:
Component: ui design | Version: 0.4.0
Keywords: ticket responsive |
-------------------------------+--------------------
==== How to Reproduce ====
While doing a GET operation on `/ticket/48`, Trac issued an internal
error.
This was my first view of ticket responsive web UI . It just crashed . I'm
running r1442618 at the moment .
Request parameters:
{{{
{'id': u'48'}
}}}
User agent: `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0)
Gecko/20100101 Firefox/11.0`
==== System Information ====
|| '''`Trac`''' || `1.0` [[br]] `` ||
|| '''`Trac`''' || `1.0` [[br]] `` ||
|| '''`Bloodhound Trac`''' || `1.0` ||
|| '''`Bloodhound Trac`''' || `1.0` ||
|| '''`Docutils`''' || `0.6` ||
|| '''`Genshi`''' || `0.6 (without speedups)` ||
|| '''`Mercurial`''' || `2.1` ||
|| '''`Pygments`''' || `1.2.2` ||
|| '''`pysqlite`''' || `2.4.1` ||
|| '''`Python`''' || `2.6.5 (r265:79063, Apr 16 2010, 13:57:41) ` [[br]]
`[GCC 4.4.3]` ||
|| '''`Python`''' || `2.6.5 (r265:79063, Apr 16 2010, 13:57:41) ` [[br]]
`[GCC 4.4.3]` ||
|| '''`RPC`''' || `1.1.2` ||
|| '''`setuptools`''' || `0.6c11` ||
|| '''`setuptools`''' || `0.6c11` ||
|| '''`SQLite`''' || `3.6.22` ||
|| '''`Subversion`''' || `1.6.6 (r40053)` ||
|| '''`jQuery`''' || `1.7.2` ||
==== Enabled Plugins ====
|| '''`BloodhoundDashboardPlugin`''' || `0.3.0` ||
|| '''`BloodhoundDataWidgets`''' || `1.0.0` ||
|| '''`BloodhoundMultiProduct`''' || `0.4.0` ||
|| '''`BloodhoundTheme`''' || `0.3.0` ||
|| '''`IniAdmin`''' || `0.2` ||
|| '''`TracAccountManager`''' || `0.3.2` ||
|| '''`TracDeveloper`''' || `0.2` ||
|| '''`TracGrowlPlugin`''' || `0.2.1dev` ||
|| '''`TracGViz`''' || `1.4.1` ||
|| '''`TracMercurial`''' || `0.13.0.5dev` ||
|| '''`TracPaste`''' || `0.2.2-r11689` ||
|| '''`TracThemeEngine`''' || `2.1.3` ||
|| '''`TracXMLRPC`''' || `1.1.2` ||
==== Python Traceback ====
{{{
Traceback (most recent call last):
File "/path/to/bloodhound/trac/trac/web/main.py", line 497, in
_dispatch_request
dispatcher.dispatch(req)
File "/path/to/bloodhound/trac/trac/web/main.py", line 233, in dispatch
content_type)
File "/path/to/bloodhound/trac/trac/web/chrome.py", line 1003, in
render_template
encoding='utf-8')
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 183, in render
return encode(generator, method=method, encoding=encoding, out=out)
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 58, in encode
for chunk in iterator:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 339, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 826, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 670, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 771, in __call__
for kind, data, pos in chain(stream, [(None, None, None)]):
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 586, in __call__
for ev in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/path/to/bloodhound/trac/trac/web/chrome.py", line 1140, in
_strip_accesskeys
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/path/to/bloodhound/trac/trac/web/chrome.py", line 1129, in
_generate
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File
"/media/b-500gb/projects/_svn/tho/tracdeveloperplugin/trunk/tracdeveloper/log.py",
line 62, in fn
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 686, in
_unmark
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 954, in
__call__
for mark, (kind, data, pos) in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 714, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 779, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 954, in
__call__
for mark, (kind, data, pos) in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 714, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 779, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 1175, in
__call__
for mark, (kind, data, pos) in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 714, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 779, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 726, in
__call__
mark, subevent = next()
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 682, in
_mark
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in
_include
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 378, in
_match
ctxt, start=idx + 1, **vars):
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 378, in
_match
ctxt, start=idx + 1, **vars):
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 327, in
_match
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 545, in
_flatten
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/path.py", line 588, in _generate
subevent = next()
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in
_include
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 316, in
_strip
event = next()
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 545, in
_flatten
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/path.py", line 588, in _generate
subevent = next()
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in
_include
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 316, in
_strip
event = next()
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 545, in
_flatten
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/directives.py", line 366, in
__call__
for item in iterable:
File "/path/to/bloodhound/trac/trac/util/presentation.py", line 110, in
group
buf += [None] * (num - len(buf))
TypeError: unsupported operand type(s) for -: 'str' and 'int'
}}}
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone:
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Comment (by matevzb):
Please check whether r1443160 fixes the issue, one of the tuples
constructed for group() contained too many parameters (unfortunately I was
unable to reproduce the problem).
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:3>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone:
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Changes (by olemis):
* cc: olemis+bh@… (added)
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:2>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone: Release 5
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Changes (by olemis):
* milestone: => Release 5
Comment:
It seems to me that this is serious enough so as to schedule its
resolution for milestone Release 5 , at least in advance . May be changed
later .
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:7>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: matevzb
Type: defect | Status: closed
Priority: blocker | Milestone: Release 5
Component: ui design | Version: 0.4.0
Resolution: fixed | Keywords: ticket responsive
------------------------+-------------------------------
Changes (by olemis):
* status: accepted => closed
* resolution: => fixed
Comment:
Replying to [comment:14 andrej]:
> I had the same problem as Olemis describes. It looks like r1443348
fixes the problem.
+1
/me closing the ticket then .
jftr r1443348 fixes this issue as mentioned in comment:11 . Feel free to
reopen it if any other similar regression is detected
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:15>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone:
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Comment (by olemis):
This error is not about plugins . I go back to changesets prior to
responsive implementation and everything works once again .
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: matevzb
Type: defect | Status: accepted
Priority: blocker | Milestone: Release 5
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Comment (by andrej):
I had the same problem as Olemis describes. It looks like r1443348 fixes
the problem.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:14>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: matevzb
Type: defect | Status: accepted
Priority: blocker | Milestone: Release 5
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Changes (by matevzb):
* owner: nobody => matevzb
* status: new => accepted
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:12>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone: Release 5
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Comment (by olemis):
Hint
{{{
File "/path/to/bloodhound/trac/trac/util/presentation.py", line 110,
in group
Code fragment:
Line
105 buf.append(item)
106 if flush or len(buf) == num:
107 yield tuple(buf)
108 del buf[:]
109 if buf:
110 buf += [None] * (num - len(buf))
111 yield tuple(buf)
112
113
114 def istext(text):
115 """`True` for text (`unicode` and `str`), but `False` for
`Markup`."""
Local variables:
Name Value
buf [{'rendered': <Markup u'<p>\n<a class="wiki" ...
flush None
item {'name': u'test_six', 'format': 'plain', 'optional':
False, 'label': ...
iterable [{'rendered': <Markup u'<p>\n<a class="wiki" ...
num 'span8'
predicate None
}}}
... so it seems `num = 'span8' ` is the root cause of the problem
PS: I confirm I could not reproduce this issue on a fresh installation
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:9>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone:
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Comment (by olemis):
Replying to [comment:3 matevzb]:
> Please check whether r1443160 fixes the issue, one of the tuples
constructed for group() contained too many parameters (unfortunately I was
unable to reproduce the problem).
I'll take a look once again and let you know asap ... thnx !
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:5>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: matevzb
Type: defect | Status: accepted
Priority: blocker | Milestone: Release 5
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Comment (by olemis):
Replying to [comment:11 matevzb]:
> Fixed in r1443348, please test against your environment.
... as soon as I wake up ... later today
;)
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:13>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone: Release 5
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Comment (by matevzb):
Fixed in r1443348, please test against your environment.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:11>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone:
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Comment (by gjm):
I have not seen this error when I am running on r1443115
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:4>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone:
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Comment (by olemis):
Replying to [comment:5 olemis]:
> Replying to [comment:3 matevzb]:
> > Please check whether r1443160 fixes the issue, one of the tuples
constructed for group() contained too many parameters (unfortunately I was
unable to reproduce the problem).
>
> I'll take a look once again and let you know asap ... thnx !
Hmmm ... not quite
:-/
It is still failing .
Hint : After reviewing traceback report and error message , it seems to me
that an expression in a Genshi template is trying to subtract an integer
from an string value ... at some point ... what do you think ?
PS: I'll try with a pristine environment too .
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:6>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone: Release 5
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Comment (by matevzb):
Reproduced with slight code modifications - the bh_ticket_box.html's
params passed to group() are the culprit. One of the params is a reference
to bh_ticket.html's colspan, which is incorrect.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:10>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker
Re: [Apache Bloodhound] #366: TypeError: unsupported operand
type(s) for -: 'str' and 'int'
Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#366: TypeError: unsupported operand type(s) for -: 'str' and 'int'
------------------------+-------------------------------
Reporter: olemis | Owner: nobody
Type: defect | Status: new
Priority: blocker | Milestone: Release 5
Component: ui design | Version: 0.4.0
Resolution: | Keywords: ticket responsive
------------------------+-------------------------------
Description changed by olemis:
Old description:
> ==== How to Reproduce ====
>
> While doing a GET operation on `/ticket/48`, Trac issued an internal
> error.
>
> This was my first view of ticket responsive web UI . It just crashed .
> I'm running r1442618 at the moment .
>
> Request parameters:
> {{{
> {'id': u'48'}
> }}}
>
> User agent: `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0)
> Gecko/20100101 Firefox/11.0`
>
> ==== System Information ====
> || '''`Trac`''' || `1.0` [[br]] `` ||
> || '''`Trac`''' || `1.0` [[br]] `` ||
> || '''`Bloodhound Trac`''' || `1.0` ||
> || '''`Bloodhound Trac`''' || `1.0` ||
> || '''`Docutils`''' || `0.6` ||
> || '''`Genshi`''' || `0.6 (without speedups)` ||
> || '''`Mercurial`''' || `2.1` ||
> || '''`Pygments`''' || `1.2.2` ||
> || '''`pysqlite`''' || `2.4.1` ||
> || '''`Python`''' || `2.6.5 (r265:79063, Apr 16 2010, 13:57:41) ` [[br]]
> `[GCC 4.4.3]` ||
> || '''`Python`''' || `2.6.5 (r265:79063, Apr 16 2010, 13:57:41) ` [[br]]
> `[GCC 4.4.3]` ||
> || '''`RPC`''' || `1.1.2` ||
> || '''`setuptools`''' || `0.6c11` ||
> || '''`setuptools`''' || `0.6c11` ||
> || '''`SQLite`''' || `3.6.22` ||
> || '''`Subversion`''' || `1.6.6 (r40053)` ||
> || '''`jQuery`''' || `1.7.2` ||
>
> ==== Enabled Plugins ====
> || '''`BloodhoundDashboardPlugin`''' || `0.3.0` ||
> || '''`BloodhoundDataWidgets`''' || `1.0.0` ||
> || '''`BloodhoundMultiProduct`''' || `0.4.0` ||
> || '''`BloodhoundTheme`''' || `0.3.0` ||
> || '''`IniAdmin`''' || `0.2` ||
> || '''`TracAccountManager`''' || `0.3.2` ||
> || '''`TracDeveloper`''' || `0.2` ||
> || '''`TracGrowlPlugin`''' || `0.2.1dev` ||
> || '''`TracGViz`''' || `1.4.1` ||
> || '''`TracMercurial`''' || `0.13.0.5dev` ||
> || '''`TracPaste`''' || `0.2.2-r11689` ||
> || '''`TracThemeEngine`''' || `2.1.3` ||
> || '''`TracXMLRPC`''' || `1.1.2` ||
>
> ==== Python Traceback ====
> {{{
> Traceback (most recent call last):
> File "/path/to/bloodhound/trac/trac/web/main.py", line 497, in
> _dispatch_request
> dispatcher.dispatch(req)
> File "/path/to/bloodhound/trac/trac/web/main.py", line 233, in dispatch
> content_type)
> File "/path/to/bloodhound/trac/trac/web/chrome.py", line 1003, in
> render_template
> encoding='utf-8')
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 183, in render
> return encode(generator, method=method, encoding=encoding, out=out)
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 58, in encode
> for chunk in iterator:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 339, in __call__
> for kind, data, pos in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 826, in __call__
> for kind, data, pos in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 670, in __call__
> for kind, data, pos in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 771, in __call__
> for kind, data, pos in chain(stream, [(None, None, None)]):
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 586, in __call__
> for ev in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
> for event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
> for event in stream:
> File "/path/to/bloodhound/trac/trac/web/chrome.py", line 1140, in
> _strip_accesskeys
> for kind, data, pos in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
> for event in stream:
> File "/path/to/bloodhound/trac/trac/web/chrome.py", line 1129, in
> _generate
> for kind, data, pos in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
> for event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
> for event in stream:
> File
> "/media/b-500gb/projects/_svn/tho/tracdeveloperplugin/trunk/tracdeveloper/log.py",
> line 62, in fn
> for kind, data, pos in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
> for event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 686, in
> _unmark
> for mark, event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 954, in
> __call__
> for mark, (kind, data, pos) in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 714, in
> __call__
> for mark, event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 779, in
> __call__
> for mark, event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 954, in
> __call__
> for mark, (kind, data, pos) in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 714, in
> __call__
> for mark, event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 779, in
> __call__
> for mark, event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 1175, in
> __call__
> for mark, (kind, data, pos) in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 714, in
> __call__
> for mark, event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 779, in
> __call__
> for mark, event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 726, in
> __call__
> mark, subevent = next()
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 682, in
> _mark
> for event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in
> _include
> for event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 378, in
> _match
> ctxt, start=idx + 1, **vars):
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 378, in
> _match
> ctxt, start=idx + 1, **vars):
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 327, in
> _match
> for event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 545, in
> _flatten
> for kind, data, pos in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
> for event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/path.py", line 588, in _generate
> subevent = next()
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in
> _include
> for event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 316, in
> _strip
> event = next()
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 545, in
> _flatten
> for kind, data, pos in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
> for event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/path.py", line 588, in _generate
> subevent = next()
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in
> _include
> for event in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 316, in
> _strip
> event = next()
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 545, in
> _flatten
> for kind, data, pos in stream:
> File "/usr/local/lib/python2.6/dist-
> packages/Genshi-0.6-py2.6.egg/genshi/template/directives.py", line 366,
> in __call__
> for item in iterable:
> File "/path/to/bloodhound/trac/trac/util/presentation.py", line 110, in
> group
> buf += [None] * (num - len(buf))
> TypeError: unsupported operand type(s) for -: 'str' and 'int'
> }}}
New description:
==== How to Reproduce ====
While doing a GET operation on `/ticket/48`, Trac issued an internal
error.
This was my first view of ticket responsive web UI . It just crashed . I'm
running r1442618 at the moment .
Request parameters:
{{{
{'id': u'48'}
}}}
User agent: `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0)
Gecko/20100101 Firefox/11.0`
==== System Information ====
|| '''`Trac`''' || `1.0` [[br]] `` ||
|| '''`Trac`''' || `1.0` [[br]] `` ||
|| '''`Bloodhound Trac`''' || `1.0` ||
|| '''`Bloodhound Trac`''' || `1.0` ||
|| '''`Docutils`''' || `0.6` ||
|| '''`Genshi`''' || `0.6 (without speedups)` ||
|| '''`Mercurial`''' || `2.1` ||
|| '''`Pygments`''' || `1.2.2` ||
|| '''`pysqlite`''' || `2.4.1` ||
|| '''`Python`''' || `2.6.5 (r265:79063, Apr 16 2010, 13:57:41) ` [[br]]
`[GCC 4.4.3]` ||
|| '''`Python`''' || `2.6.5 (r265:79063, Apr 16 2010, 13:57:41) ` [[br]]
`[GCC 4.4.3]` ||
|| '''`RPC`''' || `1.1.2` ||
|| '''`setuptools`''' || `0.6c11` ||
|| '''`setuptools`''' || `0.6c11` ||
|| '''`SQLite`''' || `3.6.22` ||
|| '''`Subversion`''' || `1.6.6 (r40053)` ||
|| '''`jQuery`''' || `1.7.2` ||
==== Enabled Plugins ====
|| '''`BloodhoundDashboardPlugin`''' || `0.3.0` ||
|| '''`BloodhoundDataWidgets`''' || `1.0.0` ||
|| '''`BloodhoundMultiProduct`''' || `0.4.0` ||
|| '''`BloodhoundTheme`''' || `0.3.0` ||
|| '''`IniAdmin`''' || `0.2` ||
|| '''`TracAccountManager`''' || `0.3.2` ||
|| '''`TracDeveloper`''' || `0.2` ||
|| '''`TracGrowlPlugin`''' || `0.2.1dev` ||
|| '''`TracGViz`''' || `1.4.1` ||
|| '''`TracMercurial`''' || `0.13.0.5dev` ||
|| '''`TracPaste`''' || `0.2.2-r11689` ||
|| '''`TracThemeEngine`''' || `2.1.3` ||
|| '''`TracXMLRPC`''' || `1.1.2` ||
==== Python Traceback ====
{{{
#!py
Traceback (most recent call last):
File "/path/to/bloodhound/trac/trac/web/main.py", line 497, in
_dispatch_request
dispatcher.dispatch(req)
File "/path/to/bloodhound/trac/trac/web/main.py", line 233, in dispatch
content_type)
File "/path/to/bloodhound/trac/trac/web/chrome.py", line 1003, in
render_template
encoding='utf-8')
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 183, in render
return encode(generator, method=method, encoding=encoding, out=out)
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 58, in encode
for chunk in iterator:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 339, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 826, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 670, in __call__
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 771, in __call__
for kind, data, pos in chain(stream, [(None, None, None)]):
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 586, in __call__
for ev in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/path/to/bloodhound/trac/trac/web/chrome.py", line 1140, in
_strip_accesskeys
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/path/to/bloodhound/trac/trac/web/chrome.py", line 1129, in
_generate
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File
"/media/b-500gb/projects/_svn/tho/tracdeveloperplugin/trunk/tracdeveloper/log.py",
line 62, in fn
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 686, in
_unmark
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 954, in
__call__
for mark, (kind, data, pos) in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 714, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 779, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 954, in
__call__
for mark, (kind, data, pos) in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 714, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 779, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 1175, in
__call__
for mark, (kind, data, pos) in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 714, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 779, in
__call__
for mark, event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 726, in
__call__
mark, subevent = next()
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/filters/transform.py", line 682, in
_mark
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in
_include
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 378, in
_match
ctxt, start=idx + 1, **vars):
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 378, in
_match
ctxt, start=idx + 1, **vars):
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 327, in
_match
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 545, in
_flatten
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/path.py", line 588, in _generate
subevent = next()
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in
_include
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 316, in
_strip
event = next()
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 545, in
_flatten
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/path.py", line 588, in _generate
subevent = next()
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in
_include
for event in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 316, in
_strip
event = next()
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 545, in
_flatten
for kind, data, pos in stream:
File "/usr/local/lib/python2.6/dist-
packages/Genshi-0.6-py2.6.egg/genshi/template/directives.py", line 366, in
__call__
for item in iterable:
File "/path/to/bloodhound/trac/trac/util/presentation.py", line 110, in
group
buf += [None] * (num - len(buf))
TypeError: unsupported operand type(s) for -: 'str' and 'int'
}}}
--
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/366#comment:8>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker