Modify

Opened 2 years ago

Last modified 2 years ago

#10550 new defect

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

Reported by: dkgdkg Owned by: cboos
Priority: normal Component: GraphvizPlugin
Severity: normal Keywords:
Cc: rjollos 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 dkgdkg 2 years ago.
work around initial error message
deflate-when-testing.diff (643 bytes) - added by dkgdkg 2 years ago.
This seems to be the proper way to work around the initial error

Download all attachments as: .zip

Change History (3)

Changed 2 years ago by dkgdkg

work around initial error message

Changed 2 years ago by dkgdkg

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

comment:1 Changed 2 years ago by rjollos

  • Cc rjollos added; anonymous removed
  • Owner changed from pkropf to cboos

Add Comment

Modify Ticket

Action
as new The owner will remain cboos.
Author


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

 
Note: See TracTickets for help on using tickets.