Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#7474 closed defect (fixed)

blame always fails

Reported by: trac@… Owned by: Christian Boos
Priority: normal Milestone: 0.11.2
Component: rendering Version: 0.11
Severity: normal Keywords: add_warning
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I had blame support working in an earlier version, but since updating to Trac-0.11-py2.3.egg, I get the following error messsage whenever I try to view annotations:

HTML preview not available, since no preview renderer could handle it.
Try downloading the file instead.

The log shows this warning:

2008-07-28 16:37:52,924 Trac[api] WARNING: HTML preview
using <trac.mimeview.api.PlainTextRenderer object at 0xf69749ec>
failed (unsupported operand type(s) for %: 'Fragment' and 'tuple')

Attachments (0)

Change History (9)

comment:1 by ebray <hyugaricdeau@…>, 16 years ago

You probably need to upgrade Genshi to 0.5.

comment:2 by anonymous, 16 years ago

No, that's not it:

easy_install -Z Genshi
Searching for Genshi
Best match: Genshi 0.5.1
Processing Genshi-0.5.1-py2.3-linux-i686.egg
Genshi 0.5.1 is already the active version in easy-install.pth

comment:3 by ebray <hyugaricdeau@…>, 16 years ago

Sorry, you're right, I was confusing Fragment with Markup. Now I'm not sure.

comment:4 by axcsrs@…, 16 years ago

I am having the same issue, although I don't have Blame installed. See attached for config.

comment:5 by axcsrs@…, 16 years ago

Sorry, couldn't attach file, but here are the relevant bits:

System Information
Trac:  	0.11
Python: 	2.5.2 (r252:60911, Jul 31 2008, 17:44:49) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
setuptools: 	0.6c8
SQLite: 	3.4.2
pysqlite: 	2.4.0
Genshi: 	0.5.1
mod_python: 	3.3.1
Subversion: 	1.4.6 (r28521)
jQuery:	1.2.3

components  	tractags.*  	enabled
tractoc.* 	enabled
tracvote.* 	enabled
tracvote.votesystem 	enabled
wikitopdf.* 	enabled

mimeviewer  	enscript_modes  	text/x-dylan:dylan:4
enscript_path 	enscript
max_preview_size 	262144
mime_map 	text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb
php_path 	php
silvercity_modes 	
tab_width 	8

comment:6 by axcsrs@…, 16 years ago

Solved for me - On Ubuntu 8.04, installing the php5-cli package was the trick.

comment:7 by trac@…, 16 years ago

It looks like the php5-cli package mostly installs the commandline version of php at /usr/bin/php5. My distro already has /usr/bin/php, so I tried symlinking it to 'php5', but there's no difference.

One important thing to note: Due to my distro (CentOS 4.6), I'm stuck with svn 1.1.4. I tried installing 1.5.1 into /usr/local, but couldn't get Trac to use it. The About page still reports the old version. I don't want to install svn 1.5.1 into the standard location because it requires a newer version of APR and Apache than my distro includes.

More info from the log:

2008-08-29 16:42:20,632 Trac[api] WARNING: Can't use annotator 'blame': svn blame failed: 'module' object has no attribute 'svn_opt_revision_value_t'
2008-08-29 16:42:20,632 Trac[api] WARNING: HTML preview using <trac.mimeview.php.PHPRenderer object at 0xf69828cc> failed (unsupported operand type(s) for %: 'Fragment' and 'tuple')
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/Trac-0.11stable_r7496-py2.3.egg/trac/mimeview/api.py", line 655, in render
    m and Ranges(m))
  File "/usr/lib/python2.3/site-packages/Trac-0.11stable_r7496-py2.3.egg/trac/mimeview/api.py", line 695, in _render_source
    " annotator:") +
  File "/usr/lib/python2.3/site-packages/Trac-0.11stable_r7496-py2.3.egg/trac/web/chrome.py", line 116, in add_warning
    req.chrome['warnings'].append(msg % args)
TypeError: unsupported operand type(s) for %: 'Fragment' and 'tuple'

comment:8 by Christian Boos, 16 years ago

Component: generalrendering
Keywords: add_warning added
Milestone: 0.11.2
Owner: set to Christian Boos
Status: newassigned

add_warning and add_notice didn't support Genshi Fragment arguments, contrary to the expectations of Mimeview._render_source.

comment:9 by Christian Boos, 16 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [7595].

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.