Modify ↓
Opened 13 years ago
Last modified 6 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)
Change History (4)
Changed 13 years ago by
| Attachment: | fix-error-when-rendering-svgz.diff added |
|---|
Changed 13 years ago by
| Attachment: | deflate-when-testing.diff added |
|---|
This seems to be the proper way to work around the initial error
comment:1 Changed 13 years ago by
| Cc: | Ryan J Ollos added; anonymous removed |
|---|---|
| Owner: | changed from Peter Kropf to Christian Boos |
comment:2 Changed 6 years ago by
| Cc: | Ryan J Ollos removed |
|---|
Note: See
TracTickets for help on using
tickets.



work around initial error message