Can't export to WMF (UniConvertor failed)

Bug #474963 reported by John M. Długosz on 2009-11-05
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Unassigned
UniConvertor
Confirmed
Undecided
Unassigned
inkscape (Ubuntu)
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

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
John M. Długosz (jdlugosz) wrote :
Changed in inkscape:
status: Incomplete → New
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.”

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.

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

Jay Maechtlen (techpubs) wrote :

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

Inkscape 0.47 pre3

jazzynico (jazzynico) on 2009-11-28
Changed in uniconvertor:
status: New → Confirmed
jazzynico (jazzynico) on 2010-09-26
Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
Alex Valavanis (valavanisalex) wrote :

Confirmed in inkscape_0.48.1-0ubuntu2 in Ubuntu Natty

Changed in inkscape (Ubuntu):
importance: Undecided → Medium
status: New → Triaged

same over here. 0.48.1 in ubuntu

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?

Alvin Penner (apenner) wrote :

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

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?

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

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.

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  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers