Save as plt fails on Vista

Bug #501154 reported by Robert Hulsebos
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Unassigned

Bug Description

When I save an loaded image using "Save as .." menu option for exporting to .PLT format on my Windows Vista PC I get a dialog window with this text: "Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected."

Additional info in dialog window about Uniconvertor:

UniConvertor failed:

Traceback (most recent call last):

  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app/plugins/Filters/svgloader.py", line 979, 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 123, in parse

    self.feed(buffer)

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

    self._parser.Parse(data, isFinal)

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

    self._cont_handler.startElement(name, AttributesImpl(attrs))

  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app/plugins/Filters/svgloader.py", line 338, in startElement

    getattr(self, method)(attrs)

  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app/plugins/Filters/svgloader.py", line 853, in image

    image = load_image(os.path.join(self.loader.directory, href)).image

  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app\Graphics\image.py", line 87, in load_image

    image = PIL.Image.open(filename)

  File "C:\Program Files\Inkscape\python\lib\site-packages\PIL\Image.py", line 1888, in open

    fp = __builtin__.open(fp, "rb")

IOError: [Errno 2] No such file or directory: 'C:\\Users\\ROBERT~1\\AppData\\Local\\Temp\\file:///C:/Bert/wk.bmp'

Traceback (most recent call last):

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

  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\__init__.py", line 72, in <module>

    doc = load.load_drawing(sys.argv[1])

  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app\io\load.py", line 364, 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 337, in load_drawing_from_file

    doc = loader.Load()

  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app/plugins/Filters/svgloader.py", line 979, 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 123, in parse

    self.feed(buffer)

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

    self._parser.Parse(data, isFinal)

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

    self._cont_handler.startElement(name, AttributesImpl(attrs))

  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app/plugins/Filters/svgloader.py", line 338, in startElement

    getattr(self, method)(attrs)

  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app/plugins/Filters/svgloader.py", line 853, in image

    image = load_image(os.path.join(self.loader.directory, href)).image

  File "C:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app\Graphics\image.py", line 87, in load_image

    image = PIL.Image.open(filename)

  File "C:\Program Files\Inkscape\python\lib\site-packages\PIL\Image.py", line 1888, in open

    fp = __builtin__.open(fp, "rb")

IOError: [Errno 2] No such file or directory: 'C:\\Users\\ROBERT~1\\AppData\\Local\\Temp\\file:///C:/Bert/wk.bmp'

Related branches

Revision history for this message
su_v (suv-lp) wrote :

Could you please attach one of the SVG files that fails to export to PLT?

tags: added: exporting uniconvertor
Changed in inkscape:
status: New → Incomplete
Revision history for this message
Robert Hulsebos (robert-hulsebos) wrote :
Revision history for this message
su_v (suv-lp) wrote :

@Alvin - do you know if Inkscape 0.47 now includes UniConvertor 1.1.4 or still 1.1.3? AFAIK PLT support was only added in version 1.1.4 which would explain the failure.
I cannot reproduce it with a similar file (containing a simple path and a linked bitmap (raster) image): the image is silently dropped and the vector object correctly exported (besides the known scaling issue) with UniConvertor 1.1.5 prerelease. Same when exporting to *.hpgl: the bitmap image is ignored and all vector information is correctly exported.

@Robert - your file doesn't contain any vector information - I doubt that a plotter could handle raster images that haven't been vectorized (http://en.wikipedia.org/wiki/HPGL). So even if UniConvertor supported PLT on win32 the file 'wk.plt' would be empty.

    <image
       y="353.36218"
       x="238.85715"
       id="image2826"
       height="358"
       width="368"
       xlink:href="file:///C:/Bert/wk.bmp" />

If the same error happens when exporting to *.wmf of *.sk1 - please attach the bitmap file as well so we can test it on other platforms (Inkscape 0.47 uses UniConvertor as helper application to export to *.plt, *.wmf, *.sk1). It could possibly be related to
Bug #487410 “export to EMF or WMF omits images from graphic”
Bug #492904 “Won't save as .wmf file with .jpg inserted in drawing”

Changed in inkscape:
status: Incomplete → New
Revision history for this message
Alvin Penner (apenner) wrote :

- yes,currently, the Windows version of Inkscape ships with Python 2.5 and Uniconvertor 1.1.3
- these would both need to be upgraded to Python 2.6 and uniconvertor 1.1.4 to use the .plt output
- one alternative that should work is .hpgl which is really the same as .plt
- however, it needs to be _vector only_.

Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape 0.47. But my error message is a bit simpler:

UniConvertor failed:
ERROR: unrecognized extension .plt

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
summary: - Save as.. fails for many formats on Vista PC
+ Save as plt fails on Vista
Changed in inkscape:
milestone: none → 0.48
Revision history for this message
jazzynico (jazzynico) wrote :

Works as expected on Windows XP, Inkscape 0.48 (http://sourceforge.net/projects/inkscape/files/inkscape/).

Changed in inkscape:
status: Confirmed → Fix Committed
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.