#3898 closed defect (fixed)
coercing to Unicode: need string or buffer, NoneType found
| Reported by: | 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)
Change History (4)
Changed 17 years ago by
| Attachment: | traceinfo.txt added |
|---|
comment:1 Changed 17 years ago by
| 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 17 years ago by
| 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 17 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
(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.



trace and system information