python error on ubuntu 16.04
Closed this issue · 3 comments
cyBea commented
Thanks for your extension! Unfortunately it doesn't work for me:
$ python --version
Python 2.7.12
inkscape v0.91
ubuntu 16.04
Traceback (most recent call last):
File "applytransform.py", line 96, in <module>
e.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 265, in affect
self.getposinlayer()
File "/usr/share/inkscape/extensions/inkex.py", line 207, in getposinlayer
x = self.unittouu( xattr[0] + 'px' )
File "/usr/share/inkscape/extensions/inkex.py", line 351, in unittouu
return retval * (self.__uuconv[u.string[u.start():u.end()]] / self.__uuconv[self.getDocumentUnit()])
File "/usr/share/inkscape/extensions/inkex.py", line 304, in getDocumentUnit
p = param.match(svgwidth)
TypeError: expected string or buffer
Maybe it's a bug in ubuntu / inkscape?
Klowner commented
Strange, that doesn't look like it's directly related to this extension.. It sounds similar to this issue?
https://bugs.launchpad.net/inkscape/+bug/1463623
Looks like an issue in v0.91 where the svg root element didn't have a width/height specified
cyBea commented
Yes, you are right! I added
width="100%"
height="100%"
as pointed out in launchpad bug report and the plugin worked without this error. Thanks for your help!
Klowner commented
Happy to help!