Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13247 closed defect (fixed)

Failed to nicely render a SVN diff in ticket view

Reported by: ntmlod Owned by: Ryan J Ollos
Priority: normal Component: UserPicturesPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

On a ticket, the SVN diff looks bad with raw caracters and only colors make it different from preformatted font style. It get back to normal if UserPicturesPlugin is disabled.

The log give me the following traceback

2017-07-28 19:13:16,149 Trac[api] WARNING: HTML preview using PatchRenderer failed: 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/trac/mimeview/api.py", line 773, in render
    rendered_content, filename, url)
  File "/usr/lib/python2.7/site-packages/trac/mimeview/patch.py", line 61, in render
    data, fragment=True)
  File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 983, in render_template
    stream |= self._filter_stream(req, method, filename, stream, data)
  File "/usr/lib64/python2.7/site-packages/genshi/core.py", line 133, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 1162, in inner
    data)
  File "build/bdist.linux-x86_64/egg/userpictures/__init__.py", line 78, in filter_stream
    filter_.extend(self._ticket_filter(req, data))
  File "build/bdist.linux-x86_64/egg/userpictures/__init__.py", line 116, in _ticket_filter
    filter_.extend(self._ticket_comment_filter(req, data))
  File "build/bdist.linux-x86_64/egg/userpictures/__init__.py", line 155, in _ticket_comment_filter
    author = change['author']
KeyError: 'author'

Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by ntmlod

A ticket diff leads to the same error

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.7/site-packages/trac/web/main.py", line 233, in dispatch
    content_type)
  File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 983, in render_template
    stream |= self._filter_stream(req, method, filename, stream, data)
  File "/usr/lib64/python2.7/site-packages/genshi/core.py", line 133, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 1162, in inner
    data)
  File "build/bdist.linux-x86_64/egg/userpictures/__init__.py", line 78, in filter_stream
    filter_.extend(self._ticket_filter(req, data))
  File "build/bdist.linux-x86_64/egg/userpictures/__init__.py", line 116, in _ticket_filter
    filter_.extend(self._ticket_comment_filter(req, data))
  File "build/bdist.linux-x86_64/egg/userpictures/__init__.py", line 155, in _ticket_comment_filter
    author = change['author']
KeyError: 'author'
Last edited 7 years ago by ntmlod (previous) (diff)

comment:2 Changed 7 years ago by Ryan J Ollos

Owner: changed from ejucovy to Ryan J Ollos
Status: newaccepted

comment:3 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

Should be fixed with 642f67ae.

comment:4 Changed 7 years ago by ntmlod

Confirmed and thanks for the quick fix.

Just for my information, I wasn't sure where to create the ticket because like some others it is hosted concurrently on Github and here. Also sometimes I'm also not sure from where to download the plugin source with 1 version on trac-hacks and another on Github.
What is your recommendation in this cases ?

comment:5 Changed 7 years ago by Ryan J Ollos

FWIW, I'm more likely to look at the issue if it's posted here.

The source isn't on trac-hacks.org, but is on GitHub, BitBucket and pypi. You'll have to wait until a new release is made to download from pypi. In the meantime I would install from GitHub.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.