UniConvertor failed when save PLT files

General discussions about Inkscape.
ychan
Posts: 3
Joined: Fri Jul 26, 2013 9:19 pm

UniConvertor failed when save PLT files

Postby ychan » Wed Apr 02, 2014 12:55 pm

Hi,
New user here, i convert this SVG to PLT file for roland old Pen plotter
When I try to save my work as plt, I get this

Code: Select all

UniConvertor failed:



Traceback (most recent call last):


  File "C:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\import\svgloader.py", line 1305, in Load


    xml_reader.parse(input_source)


  File "C:\Program Files\Inkscape\python\Lib\xml\sax\expatreader.py", line 107, in parse


    xmlreader.IncrementalParser.parse(self, source)


  File "C:\Program Files\Inkscape\python\Lib\xml\sax\xmlreader.py", line 125, in parse


    self.close()


  File "C:\Program Files\Inkscape\python\Lib\xml\sax\expatreader.py", line 218, in close


    self._cont_handler.endDocument()


  File "C:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\import\svgloader.py", line 559, in endDocument


    self.parseElements(element)


  File "C:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\import\svgloader.py", line 579, in parseElements


    getattr(self, method)(attrs)


  File "C:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\import\svgloader.py", line 1140, in begin_path


    self.parse_attrs(attrs)


  File "C:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\import\svgloader.py", line 654, in parse_attrs


    self.parse_style(val)


  File "C:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\import\svgloader.py", line 667, in parse_style


    self.try_add_style(key, val)


  File "C:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\import\svgloader.py", line 756, in try_add_style


    self.style.font_size = self.user_length(val)


  File "C:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\import\svgloader.py", line 799, in user_length


    return float(str) * factor


ValueError: invalid literal for float(): medium


Traceback (most recent call last):


  File "<string>", line 1, in <module>


  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\__init__.py", line 95, in uniconv_run


    doc = load.load_drawing(input_file)


  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app\io\load.py", line 377, in load_drawing


    return load_drawing_from_file(file, filename)


  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app\io\load.py", line 354, in load_drawing_from_file


    raise SketchLoadError(_("Parsing error: ")+ str(value))


app.events.skexceptions.SketchLoadError: Parsing error: invalid literal for float(): medium


Any ideas about what's going on here? What am I doing wrong?!

I'm on XP 32 bit. Attached is a copy of what I'm working on

Cheers
Attachments
drawing.svg
(249.97 KiB) Downloaded 234 times

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: UniConvertor failed when save PLT files

Postby ragstian » Wed Apr 02, 2014 3:12 pm

Hi.

No problem on this end to save the file as HPGL.

Uisng Inkscape 0.48+devel r13149 on win7.

Saved Compressed File
drawing.zip
(135.87 KiB) Downloaded 268 times


RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

ychan
Posts: 3
Joined: Fri Jul 26, 2013 9:19 pm

Re: UniConvertor failed when save PLT files

Postby ychan » Wed Apr 09, 2014 6:37 pm

Hi,
Thank for reply, can you please show me the website for downloading that version ?. i was googling " Inkscape 0.48+devel r13149" only get version 0.48 and 0.48.4-1

BTW i notice that, 0.48.4 r9939 version .... when save the file as HPGL, the image size become very large. ( my artwork size is around 103mm, after converted to HPGL is around 3373.76mm!)

thanks

Best Regard

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: UniConvertor failed when save PLT files

Postby ragstian » Wed Apr 09, 2014 10:16 pm

Hi

The link is here. Latest version is now 13275.

https://onedrive.live.com/?cid=09706d11303fa52a&id=9706D11303FA52A!217

Latest is now 13275 - download the 7z file, not the dbg.7z file

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

gcb
Posts: 1
Joined: Sun May 15, 2016 4:20 pm

Re: UniConvertor failed when save PLT files

Postby gcb » Sun May 15, 2016 4:26 pm

Resurrecting this one.

I just tried to convert from SVG created from scratch on Inkscape 0.91 r13725, and got the same error.

The files were converting fine, until i decided to break one text object into a path.

Code: Select all

  File "/usr/lib/python2.7/site-packages/sk1libs/filters/import/svgloader.py", line 667, in parse_style
    self.try_add_style(key, val)
  File "/usr/lib/python2.7/site-packages/sk1libs/filters/import/svgloader.py", line 756, in try_add_style
    self.style.font_size = self.user_length(val)
  File "/usr/lib/python2.7/site-packages/sk1libs/filters/import/svgloader.py", line 799, in user_length
    return float(str) * factor
ValueError: could not convert string to float: medium


the only place in my svg files the word "medium" shows up is some extraneous(?) style information on the generated paths for the previously-text object

Code: Select all

    <path
       inkscape:connector-curvature="0"
       id="path4816"
       style="font-style:normal;font-weight:normal;font-size:medium;line-height:121.00000381%;font-family:sans-serif;letter-spacing:0.31999999px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
       d="m 308.32498,849.63173 0,12.42187 14.80469,0 0,5.58594 -14.80469,0 0,23.75 q 0,5.35156 1.44531,6.875 1.48438,1.52344 5.97657,1.52344 l 7.38281,0 0,6.01562 -7.38281,0 q -8.32032,0 -11.48438,-3.08593 -3.16406,-3.125 -3.16406,-11.32813 l 0,-23.75 -5.27344,0 0,-5.58594 5.27344,0 0,-12.42187 7.22656,0 z" />


can i just drop those? they seems out of place. why do i need "font-size" on a path?

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: UniConvertor failed when save PLT files

Postby v1nce » Sun May 15, 2016 7:57 pm

Yeah you probably could drop any font-* in the style of the path (and line-height, *-spacing too).
Maybe inkscape store them to be able to undo the operation ? (but if you don't store the word too it looks rather dumb)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: UniConvertor failed when save PLT files

Postby Moini » Sun May 15, 2016 11:32 pm

I think they are working on keeping the text as an ARIA attribute, so it won't be lost upon conversion. I don't think the font info is kept for undo, undo seems to use a different way for keeping track of changes.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “General Discussions”