Modify

Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#3898 closed defect (fixed)

coercing to Unicode: need string or buffer, NoneType found

Reported by: fstoffel@… Owned by: Christian Boos
Priority: normal Component: GraphvizPlugin
Severity: normal Keywords: unicode nonetype
Cc: andre.sudhoff@… Trac Release: 0.11

Description

I've installed Trac 0.11.1 and the graphviz plugin 0.7.3 using Apache 2 and mod_python on a Debian machine. I've installed the graphviz package, libgv-python (Python bindings for graphviz), and python-pygraphviz (Python interface to the Graphviz graph layout and visualization package).

Whenever I want to create a graph in the wiki, for example using the provided graph

{{{
#!graphviz
digraph G {Hello->World->Graphviz->Rules}
}}}

the following error message appears:

Trac detected an internal error: TypeError: coercing to Unicode: need string or buffer, NoneType found

The graphviz plugin is enabled in trac.conf using

[components]
...
graphviz.* = enabled

A separate [graphviz] section does not exist. The stack trace and additional system information is attached.

Attachments (1)

traceinfo.txt (1.6 KB) - added by fstoffel@… 16 years ago.
trace and system information

Download all attachments as: .zip

Change History (4)

Changed 16 years ago by fstoffel@…

Attachment: traceinfo.txt added

trace and system information

comment:1 Changed 16 years ago by anonymous

Cc: andre.sudhoff@… added; anonymous removed

I have the same problem therefore I installed the latest graphviz version 2.20, but I still get the same error. A workaround for the problem is to set "png_antialias = false" in the trac.ini [graphviz] section.

comment:2 Changed 16 years ago by Christian Boos

Owner: changed from Peter Kropf to Christian Boos

Would you mind trying this fix:

diff -r d371bc0e7b72 graphviz/graphviz.py
--- a/graphviz/graphviz.py      Mon Oct 20 10:34:54 2008 +0200
+++ b/graphviz/graphviz.py      Mon Oct 20 10:51:14 2008 +0200
@@ -498,7 +498,7 @@
             self.rsvg_path = self.rsvg_path_option or \
                     self._find_cmd('rsvg', cmd_paths)

-            if not os.path.exists(self.rsvg_path):
+            if not (self.rsvg_path and os.path.exists(self.rsvg_path)):
                 return _("The rsvg program is set to '%(path)s' but that path "
                          "does not exist.", path=self.rsvg_path)

(apply with patch -p1)

comment:3 Changed 16 years ago by Christian Boos

Resolution: fixed
Status: newclosed

(In [4538]) GraphvizPlugin: fix check for rsvg existence, as self.rsvg_path might end up being None if both unset and not found in default paths.

Closes #3898.

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'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.