Modify

Opened 12 years ago

Last modified 5 years ago

#10550 new defect

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

Reported by: Daniel Kahn Gillmor Owned by: Christian Boos
Priority: normal Component: GraphvizPlugin
Severity: normal Keywords:
Cc: Trac Release:

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().

Attachments (2)

fix-error-when-rendering-svgz.diff (466 bytes) - added by Daniel Kahn Gillmor 12 years ago.
work around initial error message
deflate-when-testing.diff (643 bytes) - added by Daniel Kahn Gillmor 12 years ago.
This seems to be the proper way to work around the initial error

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by Daniel Kahn Gillmor

work around initial error message

Changed 12 years ago by Daniel Kahn Gillmor

Attachment: deflate-when-testing.diff added

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

comment:1 Changed 12 years ago by Ryan J Ollos

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

comment:2 Changed 5 years ago by Ryan J Ollos

Cc: Ryan J Ollos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Christian Boos.

Add Comment


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

 
Note: See TracTickets for help on using tickets.