Modify

Opened 7 years ago

Closed 7 years ago

#2318 closed defect (fixed)

TypeError: sequence item 0: expected string, Context found

Reported by: Benn Owned by: Blackhex
Priority: normal Component: DiscussionPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

How to Reproduce

While doing a GET operation on /discussion, Trac issued an internal error.

(please provide additional details here)

System Information

Trac 0.11dev
Python 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32 bit (Intel)]
setuptools 0.6c7
SQLite 3.3.4
pysqlite 2.3.2
Genshi 0.4.4
Subversion 1.4.5 (r25188)

Python Traceback

Traceback (most recent call last):
  File "e:\trac\trac-current\trac\web\main.py", line 398, in _dispatch_request
    dispatcher.dispatch(req)
  File "e:\trac\trac-current\trac\web\main.py", line 217, in dispatch
    data, content_type)
  File "e:\trac\trac-current\trac\web\chrome.py", line 621, in render_template
    return stream.render(method, doctype=doctype)
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\core.py", line 154, in render
    return encode(generator, method=method, encoding=encoding)
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\output.py", line 45, in encode
    output = u''.join(list(iterator))
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\output.py", line 274, in __call__
    for kind, data, pos in stream:
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\output.py", line 519, in __call__
    for kind, data, pos in stream:
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\output.py", line 679, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\output.py", line 459, in __call__
    for ev in stream:
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\core.py", line 212, in _ensure
    for event in stream:
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\core.py", line 212, in _ensure
    for event in stream:
  File "e:\trac\trac-current\trac\web\chrome.py", line 673, in _strip_accesskeys
    for kind, data, pos in stream:
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\core.py", line 212, in _ensure
    for event in stream:
  File "e:\trac\trac-current\trac\web\chrome.py", line 662, in _generate
    for kind, data, pos in stream:
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\template\markup.py", line 252, in _include
    for event in stream:
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\template\markup.py", line 322, in _match
    content = list(self._include(content, ctxt))
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\template\markup.py", line 252, in _include
    for event in stream:
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\template\markup.py", line 297, in _match
    for event in stream:
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\template\markup.py", line 286, in _strip
    event = stream.next()
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\template\markup.py", line 242, in _exec
    for event in stream:
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\template\base.py", line 398, in _eval
    for kind, data, pos in stream:
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\template\base.py", line 447, in _flatten
    substream = _apply_directives(substream, ctxt, directives)
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\template\base.py", line 256, in _apply_directives
    stream = directives[0](iter(stream), ctxt, directives[1:])
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\template\directives.py", line 386, in __call__
    if self.expr.evaluate(ctxt):
  File "C:\Python25\lib\site-packages\genshi-0.4.4-py2.5.egg\genshi\template\eval.py", line 136, in evaluate
    return eval(self.code, _globals, {'data': data})
  File "e:\trac\plugins\discussionplugin-current\tracdiscussion\templates\forum-list.html", line 132, in <Expression u"'DISCUSSION_ADMIN' in perm(context)">
    <div py:if="'DISCUSSION_ADMIN' in perm(context)" class="buttons">
  File "e:\trac\trac-current\trac\perm.py", line 519, in has_permission
    return self._has_permission(action, resource)
  File "e:\trac\trac-current\trac\perm.py", line 531, in _has_permission
    check_permission(action, perm.username, resource, perm)
  File "e:\trac\trac-current\trac\perm.py", line 432, in check_permission
    (username, action, resource))
  File "e:\trac\trac-current\trac\resource.py", line 109, in __repr__
    return '<Resource %r>' % (', '.join(reversed(path)))
TypeError: sequence item 0: expected string, Context found

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by Blackhex

  • Resolution set to fixed
  • Status changed from new to closed

Trac developers has changeged something aggain. Thanks for reporting, fixed in r2917.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Blackhex. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.