Opened 13 years ago

Last modified 13 years ago

#8566 new enhancement

Port under Trac v.0.12.x and MasterTicket v.3.x ?

Reported by: slevin@… Owned by: Felix Tiede
Priority: normal Component: TracTicketDepgraphPlugin
Severity: normal Keywords: Port Trac 0.12
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

Please make port to new stable versions of Trac and MasterTicket. Current version 0.11 have a problem like:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 70: ordinal not in range(128)
2011-03-03 20:57:03,322 Trac[main] WARNING: HTTPInternalError: 500 Error Trac (Error Genshi UnicodeDecodeError ...

Attachments (0)

Change History (4)

comment:1 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 13 years ago by anonymous

Trac Release: 0.110.12

comment:3 Changed 13 years ago by anonymous

Just for the record... This is a well known problem when upgrading to newer python versions: you really need to care for encoding Unicode properly (here likely to UTF-8). Without specifying an encoding, python won't accept any character above 128.

The following patch will solve this problem for the titles generated into the dependency graph. Note: the problem is actually in the GraphvizPlugin

---	(Revision 9982)
+++	(Arbeitskopie)
@@ -12,7 +12,7 @@
 __id__        = '$Id$'
 __headurl__   = '$HeadURL$'
 __docformat__ = 'restructuredtext'
-__version__   = '0.7.5'
+__version__   = ''
 from setuptools import setup, find_packages
Index: graphviz/
--- graphviz/	(Revision 9982)
+++ graphviz/	(Arbeitskopie)
@@ -408,7 +408,7 @@
             f = open(map_path, 'r')
             map = f.readlines()
-            map = "".join(map).replace('\n', '')
+            map = unicode("".join(map).replace('\n', ''), 'utf-8')
             return tag(, id='G'+sha_key, name='G'+sha_key),
                        tag.img(src=img_url, usemap="#G"+sha_key, 
                                alt=_("GraphViz image")))

comment:4 Changed 13 years ago by ichthyo

After solving that, there is still another problem: the default setting for the dpi-value (=96) is too large. Adjust it in the trac.ini

default_graph_dpi = 70

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Felix Tiede.

Add Comment

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

Note: See TracTickets for help on using tickets.