Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#4647 closed defect (fixed)

Cannot view changesets

Reported by: rcmadruga@… Owned by: Christian Boos
Priority: high Milestone: 0.11
Component: version control/changeset view Version: devel
Severity: major Keywords: genshi
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When I try to view a changeset, I get this error. Already tried to resync environment without success.

Using Trac 0.11 with Python 2.5, subversion 1.4.2 on windows XP

 Trac detected an internal error:

TypeError: visit() got multiple values for keyword argument 'locals_'

The log message is this:

2007-02-02 18:21:57,453 Trac[main] ERROR: visit() got multiple values for keyword argument 'locals_'
Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\trac\web\main.py", line 401, in dispatch_request
    dispatcher.dispatch(req)
  File "C:\Python25\Lib\site-packages\trac\web\main.py", line 227, in dispatch
    content_type)
  File "C:\Python25\Lib\site-packages\trac\web\chrome.py", line 536, in render_template
    template = self.load_template(filename, method=method)
  File "C:\Python25\Lib\site-packages\trac\web\chrome.py", line 520, in load_template
    return self.templates.load(filename, cls=cls)
  File "C:\Python25\Lib\site-packages\genshi\template.py", line 1395, in load
    loader=self, encoding=encoding)
  File "C:\Python25\Lib\site-packages\genshi\template.py", line 1000, in __init__
    loader=loader, encoding=encoding)
  File "C:\Python25\Lib\site-packages\genshi\template.py", line 811, in __init__
    self.stream = self._parse(encoding)
  File "C:\Python25\Lib\site-packages\genshi\template.py", line 1042, in _parse
    pos[1], pos[2]))
  File "C:\Python25\Lib\site-packages\genshi\template.py", line 751, in __init__
    Expression(node.expr, filename, lineno)))
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 85, in __init__
    lineno=lineno)
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 168, in _compile
    tree = ExpressionASTTransformer().visit(node)
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 247, in visit
    return v(node, *args, **kwargs)
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 250, in visitExpression
    node.node = self.visit(node.node, *args, **kwargs)
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 247, in visit
    return v(node, *args, **kwargs)
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 281, in _visitBoolOp
    node.nodes = [self.visit(x, *args, **kwargs) for x in node.nodes]
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 247, in visit
    return v(node, *args, **kwargs)
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 256, in visitCallFunc
    node.node = self.visit(node.node, *args, **kwargs)
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 247, in visit
    return v(node, *args, **kwargs)
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 397, in visitGetattr
    ast.Name('data'), self.visit(node.expr, locals_=locals_),
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 247, in visit
    return v(node, *args, **kwargs)
  File "C:\Python25\Lib\site-packages\genshi\eval.py", line 360, in visitSlice
    node.expr = self.visit(node.expr, locals_=True, *args, **kwargs)
TypeError: visit() got multiple values for keyword argument 'locals_'

Any help would be great…

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 18 years ago

Keywords: genshi python25 added; changeset error removed
Owner: Christian Boos removed
Priority: normalhigh

comment:2 by Christian Boos, 18 years ago

Keywords: python25 removed
Owner: set to Christian Boos

Hm, from #4663, looks like it's not an issue related to the use of Python 2.5, as I originally thought.

comment:3 by Christian Boos, 18 years ago

Ok, looks like the recent changes I made in changeset.html only work with Genshi trunk (see [G437]).

I'll try to make this compatible with 0.3.6 again…

comment:4 by Christian Boos, 18 years ago

Resolution: fixed
Status: newclosed

r4686 should do the trick… it's not that elegant though, but I didn't find a better way to emulate the string slicing.

Anyway, this is a temporary hack until Genshi 0.4 becomes an official requirement for Trac 0.11, which shouldn't be that far away…

in reply to:  4 comment:5 by Matthew Good, 18 years ago

Replying to cboos:

r4686 should do the trick… it's not that elegant though, but I didn't find a better way to emulate the string slicing.

Feel free to ask on the dev mailing list when you're not finding a good workaround for something like this. I've committed r4688 which uses the proper Python methods for handling slices. Keep in mind that Python operators are implemented under the hood with the special __something__ methods.

comment:6 by Christian Boos, 18 years ago

Thanks Matt, I did find about slice(), but didn't think about using that in the __getitem__ method…

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.