Can't export to WMF (UniConvertor failed)

Bug #474963 reported by John M. Długosz
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Unassigned
UniConvertor
Confirmed
Undecided
Unassigned
inkscape (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

This is similar to #378660, but different.

A drawing created from scratch in Inkscape 0.47 gives the error log pasted below.
This was installed on WinXP using the "installer" for Windows.

===
UniConvertor failed:

Traceback (most recent call last):

  File "C:\Program Files (x86)\Inkscape\python\lib\site-packages\uniconvertor\app/plugins/Filters/svgloader.py", line 979, in Load

    xml_reader.parse(input_source)

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

    xmlreader.IncrementalParser.parse(self, source)

  File "C:\Program Files (x86)\Inkscape\python\Lib\xml\sax\xmlreader.py", line 123, in parse

    self.feed(buffer)

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

    self._parser.Parse(data, isFinal)

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

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

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

    getattr(self, method)(attrs)

  File "C:\Program Files (x86)\Inkscape\python\lib\site-packages\uniconvertor\app/plugins/Filters/svgloader.py", line 935, in use

    if data[0] == 'object':

TypeError: 'NoneType' object is unsubscriptable

Traceback (most recent call last):

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

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

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

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

    doc = loader.Load()

  File "C:\Program Files (x86)\Inkscape\python\lib\site-packages\uniconvertor\app/plugins/Filters/svgloader.py", line 979, in Load

    xml_reader.parse(input_source)

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

    xmlreader.IncrementalParser.parse(self, source)

  File "C:\Program Files (x86)\Inkscape\python\Lib\xml\sax\xmlreader.py", line 123, in parse

    self.feed(buffer)

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

    self._parser.Parse(data, isFinal)

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

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

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

    getattr(self, method)(attrs)

  File "C:\Program Files (x86)\Inkscape\python\lib\site-packages\uniconvertor\app/plugins/Filters/svgloader.py", line 935, in use

    if data[0] == 'object':

TypeError: 'NoneType' object is unsubscriptable

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

Please add the SVG file that fails to export to WMF so that we have can reproduce this error and figure out whether the bug is in Inkscape or in UniConvertor <http://sk1project.org/modules.php?name=Products&product=uniconvertor>.

tags: added: exporting uniconvertor wmf
Changed in inkscape:
status: New → Incomplete
Revision history for this message
John M. Długosz (jdlugosz) wrote :
Changed in inkscape:
status: Incomplete → New
Revision history for this message
su_v (suv-lp) wrote :

reproduced with Inkscape 0.46+devel r22566 on OS X 10.5.8, Python 2.6.2, UniConvertor 1.1.5 prerelease

further tests:
1) unlinking all clones
UniConverter now fails with "ValueError: Cannot find font Slim."

- It seems that current versions of UniConverter don't support clones.
- Font error: see the related UniConverter Bug report <http://sk1project.org/forum/viewthread.php?thread_id=46>: «… is consequence of primitive text engine inherited from Skencil. We have improved text support in sK1 but these changes have not implemented in UniConverter because font engine is primitive and requires further improvements.»

2) unlinking all clones and converting all text objects to paths
UniConverter still fails with "ValueError: Cannot find font Slim."

This could be related to Inkscape's retaining of font style attributes after converting text objects to paths, see bug #168720 “Text styles remain in type objects converted to paths.”

Revision history for this message
Alvin Penner (apenner) wrote :

this is a uniconvertor bug, so it cannot be repaired here. A bug report will need to be filed with the developer of uniconvertor. For what it is worth, the problem is not unique to .wmf. You will get the same error if you try to use uniconvertor to produce .ps or .pdf or .svg. I assume the cloning is the problem, but that's just a guess.

Revision history for this message
Jay Maechtlen (techpubs) wrote :

Inkscape 0.47pre
Win XP pro, 2GB Ram, lots of hdd free.
Sometimes I can export WMF and EMF successfully, but in all cases it omits any bitmaps.
I can create files in CorelDraw and send to WMF/EMF with bitmaps, so the format will accept them.
But either Inkscape or uniconverter leaves the bitmap portion our of the finished WMF/EMF.
- the svg file seems awful small - is it just linking to the images? Is there some way to embed the images in the file for better reliability/portability?
It makes an EPS ok, but the resulting file is 36 MB in size (!)
I'll follow with the PDF, fwiw

Revision history for this message
Jay Maechtlen (techpubs) wrote :

here's the PDF, done via Acrobat 8 3D

Inkscape 0.47 pre3

jazzynico (jazzynico)
Changed in uniconvertor:
status: New → Confirmed
jazzynico (jazzynico)
Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Confirmed in inkscape_0.48.1-0ubuntu2 in Ubuntu Natty

Changed in inkscape (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
vladimir prieto (vladimirprieto) wrote :

same over here. 0.48.1 in ubuntu

Revision history for this message
Alvin Penner (apenner) wrote :

just for clarification, are you getting a crash message, as in the original report?
does this happen with all ai exports or just one specific file?

Revision history for this message
Alvin Penner (apenner) wrote :

sorry, I meant wmf, could you attach the svg file you are exporting?

Revision history for this message
Yves Goergen (ygoe) wrote :

Still can't export to WMF from an SVG image. I installed Inkscape just for this very purpose today because Illustrator doesn't know what WMF is and Word seems to prefer that. Current Inkscape version is 0.48.4 on Windows 7. It says "Python doesn't work anymore" and then Inkscape tells me that "UniConvertor failed:" message with no further information.

Is anybody working on this one or do I need to find another solution to get my WMF file?

Revision history for this message
Alvin Penner (apenner) wrote :

if you are running Windows 7 and if you get a message that says "Python.exe has stopped working", then see Bug 656938 (for example comment 13 in that report). This is a packaging issue, as far as I can tell.

I would suggest trying to install uniconvertor 1.1.5 from
http://sk1project.org/modules.php?name=Products&product=uniconvertor&op=download

Revision history for this message
Abe Yo (abe-geel) wrote :

After installing uniconverter 1.1.5 and Inkscape you need to run the (modified) patch as described in Bug 656938.
This will update the uniconverter included in inkscape to the latest version which works fine on Windows 7.

Revision history for this message
jazzynico (jazzynico) wrote :

Fixed in Inkscape 0.91. Inkscape now uses internal filters to handle
WMF and EMF files.

Changed in inkscape:
milestone: none → 0.91
status: Confirmed → Fix Released
Changed in inkscape (Ubuntu):
status: Triaged → 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

Remote bug watches

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