Comment 2 for bug 1463623

Revision history for this message
Thomas (iam2noob4u) wrote : Re: Error trying to save Optimized SVG

Windows 7 SP1 x64 (judging from paths in OP, not limited to Windows)
Inkscape 0.91 r13725

Options turned on:
- Shorten color values
- Convert CSS attributes to XML attributes
- Group collapsing
- Create groups for similar attributes
- Embed rasters
- Remove metadata
- Remove comments
- Work around renderer bugs
- Enable viewboxing
Number of significant digits for coords: 5
XML indentation: Tab

Id options turned on:
Remove unused ID names for elements
Shorten IDs

Have tried (w/o success):
- Playing around with the options (invert every single option, changed digits for coords to 3 and to 0, tried indentation with space or none, also once inverted all options with 0 coords and space indentation)
- Running as administrator
- Running in Vista compatibility mode
- Using the downloaded extension from http://www.codedread.com/scour/#download_inkscape_extension (version 0.26)

Output shown:
Traceback (most recent call last):
  File "scour.inkscape.py", line 78, in <module>
    e.affect(output=False)
  File "D:\Inkscape\share\extensions\inkex.py", line 265, in affect
    self.getposinlayer()
  File "D:\Inkscape\share\extensions\inkex.py", line 207, in getposinlayer
    x = self.unittouu( xattr[0] + 'px' )
  File "D:\Inkscape\share\extensions\inkex.py", line 351, in unittouu
    return retval * (self.__uuconv[u.string[u.start():u.end()]] / self.__uuconv[self.getDocumentUnit()])
  File "D:\Inkscape\share\extensions\inkex.py", line 304, in getDocumentUnit
    p = param.match(svgwidth)
TypeError: expected string or buffer

(which is, apart from the paths, the same as in the OP as far as I can tell from a quick comparison)

For anyone interested, my current solution is to use https://compressor.io/compress, which also uses Scour. Perhaps using the CL script version of Scour also works.