GNOME Bugzilla – Bug 649450
dia: Error (python backtrace) on Plain SVG import
Last modified: 2011-12-30 11:58:52 UTC
Created attachment 187276 [details] SVG example file Hi, consider loading the attached example svg file via the "svg plain" import: ========================================================================== $ dia (dia:22803): GLib-WARNING **: A group named "gtk" is already part of this GOptionContext Huh? m Huh? m Huh? m ** (dia:22803): WARNING **: Too few BezPoints! ** (dia:22803): DEBUG: PyDiaProperty_ApplyToObject : no conversion bez_points -> bezpointarray <type 'exceptions.TypeError'>TypeError('prop type mis-match.',)Traceback (most recent call last):
+ Trace 227015
return imp.Render(diagramData)
od = o.Create()
self.ApplyProps(o)
o.properties["bez_points"] = self.pts ==========================================================================
Fixed by: http://git.gnome.org/browse/dia/commit/?id=ef1e4dac749648ef6a3f1712ac6a9aa756c04c3a The SVG importer is limited, e.g. when parsing path data. It stayed this way but now produces a more understandable error message.
Cherry-picked to dia-0-97
I just checked, and the problem persists in 0.97.2.
The fix might not be what you expected, but it should be in DIa 0.97.2, see: http://git.gnome.org/browse/dia/commit/?id=126b636c879fe9bc8df271875fdc7b863dfaaa8f So what is the exact behavior you are observing? And how is that different from the fix I described?
Hi, via the Bugzilla "trace beautification" or similar, the original report seems to be cut in the middle: The original Debian report was: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=623724 There, the attached file as example was loaded, and with 0.97.2, I similarly observe the following: * Using the importer "Pixbuf SVG": File can't be selected because against the official "*.svg" wildcard, the herd.svg file (and all other *.svg files) is not listed * Using "SVG Plain": Broken and with the warning you describe * Using "Scalable Vector Graphics": Broken image: Only one "Herd" circle is included and a square but different from the original SVG graphics So finally, none of the listed 3 importers work, so the bug should stay open until we have a fix. Or did I miss sth.? Thanks in advance, Roland
Checking the attached file against master reveals it is loadable via the standard C importer (it could also be loaded in 0.97.2 but does not look very similar to it's original dues to missing transformation support. Two changes which made loading possible are: commit 85899d7bbcebbf61f72a801a7a95bab276354d0c Author: Hans Breuer <hans@breuer.org> Date: Sun Sep 4 20:59:27 2011 +0200 svg: style="stroke-dasharray:none;" gives a solid line now previously it gave LINESTYLE_DASHED with dashlength=0 commit 71090b449e69271375233415b4a5bcbe48636ecb Author: Hans Breuer <hans@breuer.org> Date: Sun Aug 7 17:06:54 2011 +0200 svg: retain current point over path split SVGs with relative movement produced wrong results, when that path was split (e.g. car.svg from Inkscape examples). Now the current_point is retained across the splitting loop. Slightly related: handle a second move command directly after the initial one gracefully (there are too many borked SVG generators;)) These are not going to be back ported to 0.97, so this bug report should remain like I originally understood: a fixed limitation of the PyDia SVG error reporting.