Opened 5 years ago

graphviz plugin throws an error when rendering an output type of svgz

Reported by: Owned by: Daniel Kahn Gillmor Christian Boos normal GraphvizPlugin normal Ryan J Ollos

Description

if i try to create a graphviz object of type svgz, i get an error that looks like:

  File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 304, in process
text = self.processor(text)
File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 291, in _macro_processor
text)
File "/usr/lib/pymodules/python2.6/graphviz/graphviz.py", line 388, in expand_macro
(w_val, w_unit) = w.group(1,2)
AttributeError: 'NoneType' object has no attribute 'group'


I believe the attached patch will catch this error. However, i think the right way to fix this is to do some kind of gzip import. When i do that, though (at least running through apache's mod_python), the returned file doesn't have a proper Content-encoding: gzip header, and i don't see a good way to coerce that into req.send_file().

Changed 5 years ago by Daniel Kahn Gillmor

work around initial error message

Changed 5 years ago by Daniel Kahn Gillmor

This seems to be the proper way to work around the initial error

comment:1 Changed 5 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed changed from Peter Kropf to Christian Boos

Modify Ticket

Change Properties