HPGL exporting error from Inkscape

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
tthor
Posts: 2
Joined: Wed Sep 09, 2015 4:26 am

HPGL exporting error from Inkscape

Postby tthor » Wed Sep 09, 2015 4:45 am

Hi
I'm using Inkscape on Mint 17 and when I try to 'save as hpgl' I get the below error (copied directly from Inkscape)


Traceback (most recent call last):
File "hpgl_output.py", line 80, 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


Also...When I try to save as .Plt file I get...

you need to install the UniConvertor software.
For GNU/Linux: install the package python-uniconvertor.
For Windows: download it from
http://sk1project.org/modules.php?name= ... iconvertor
and install into your Inkscape's Python location

...which makes more sense since trying to install Uniconvertor is as useless and frustrating an endeavour you might ever have misfortune to do!

...Any help most welcome
Thanks for reading...
Dave

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: HPGL exporting error from Inkscape

Postby ~suv » Wed Sep 09, 2015 6:30 am

tthor wrote:I'm using Inkscape on Mint 17 and when I try to 'save as hpgl' I get the below error (copied directly from Inkscape)

Traceback (most recent call last):
File "hpgl_output.py", line 80, 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

This is a known error in Inkscape 0.91 with certain SVG files (mostly externally created ones, or SVG files which have been saved as 'Optimized SVG' in Inkscape) - the next Inkscape release will contain a fix for this (bug #1463623, bug #1461346). As quick workaround, you could import the original SVG file into a new default document, adjust the document page size as needed (if needed), save it as 'Inkscape SVG' file (default), and then try again to save a copy as HPGL.

Re Uniconvertor - that's up to whoever maintains the Inkscape packages for your distro (I'm somewhat surprised that apparently UniConvertor 1.1.15 is not among the recommended dependencies for Inkscape there).


Return to “Discuss Software Issues”