Ubuntu

Python.exe hangs on creating .wmf files

Reported by ProfessorF on 2010-02-02
44
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Unassigned
UniConvertor
New
Undecided
Unassigned
inkscape (Ubuntu)
Medium
Unassigned

Bug Description

Running WindowsXP Pro 64-bit. Opened a .wmf file created in diaw.exe, modified it with Inkscape 0.47, and tried to save it as a .wmf file. A blank Python.exe command box appears and hangs. I have to close it manually. The resulting .wmf file has 0 bytes.

~suv (suv-lp) wrote :

similar to bug #480664 “Save copy as ... pdf -> no file created”:
<https://bugs.launchpad.net/inkscape/+bug/480664>

tags: added: exporting win32 wmf
~suv (suv-lp) wrote :

Could you attach the original WMF file so we can try to reproduce this issue?

ProfessorF (spam-fellmeth) wrote :

Here it is as a SVG file. This file saves as a PDF just fine. It's only saving as a WMF that causes Python to hang.

jazzynico (jazzynico) wrote :
Download full text (3.4 KiB)

Confirmed on Windows XP, Inkscape 0.46, 0.47 and bzr rev. 9275. Blank python command box.
Also confirmed on Ubuntu 9.10, Inkscape 0.47 and bzr rev. 9288, Uniconvertor 1.1.4, but I also get an error message (and of course no command box...).
Exporting simple shapes (rectangles and ellipses) works well on both operating systems with all Inkscape versions.

Error message:
---
UniConvertor failed:

Cannot list directory /home/nicolas/.uniconvertor:[Errno 2] No such file or directory: '/home/nicolas/.uniconvertor'
ignoring it in font_path
Cannot list directory /home/nicolas/.uniconvertor:[Errno 2] No such file or directory: '/home/nicolas/.uniconvertor'
ignoring it in font_path
/usr/lib/pymodules/python2.6/uniconvertor/app/utils/locale_utils.py:9: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
  from popen2 import popen2
No plugin-type information in /usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/__init__.py
I can't find font Arial. I'll use Slim instead
Fontsystem not yet implemented in UniConvertor. See /usr/share/doc/python-uniconvertor/README.Debian for more info
I can't find font Balloon XBd BT. I'll use Slim instead
Fontsystem not yet implemented in UniConvertor. See /usr/share/doc/python-uniconvertor/README.Debian for more info
No plugin-type information in /usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/__init__.py
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/pymodules/python2.6/uniconvertor/__init__.py", line 88, in uniconv
    saver(doc, output_file)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/plugins.py", line 201, in __call__
    module.save(document, file, filename, options)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/wmfsaver.py", line 461, in save
    saver.SaveDocument(document)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/wmfsaver.py", line 403, in SaveDocument
    left, bottom, right, top = doc.BoundingRect()
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/Graphics/document.py", line 221, in BoundingRect
    rect = layer.bounding_rect
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/Graphics/base.py", line 352, in __getattr__
    getattr(self, method)()
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/Graphics/compound.py", line 174, in update_rects
    boxes = map(lambda o: o.coord_rect, self.objects)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/Graphics/compound.py", line 174, in <lambda>
    boxes = map(lambda o: o.coord_rect, self.objects)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/Graphics/base.py", line 352, in __getattr__
    getattr(self, method)()
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/Graphics/compound.py", line 174, in update_rects
    boxes = map(lambda o: o.coord_rect, self.objects)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/Graphics/compound.py", line 174, in <lambda>
    boxes = map(lambda o: o.coord_rect, self.objects)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/Graphics/base.py", line 352, in __getattr__
    getattr(self, m...

Read more...

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
tags: added: uniconvertor
removed: win32
Robert Heinig (r-heinig) wrote :

To reproduce, it is sufficcient to paint some Text (in Arial Narrow, which it offers on my system) on a blank page and try to save that to WMF. My inkscape.exe's version resource: 0.47.0.0 (from the download Inkscape-0.47-3.exe), python25.dll is 2.5.1150.1013.

This is a font name resolution problem!

My Analysis:
- Get the cmd process' command line, open cmd, cd to inkscape's python directory, launch the copied command line -> "...python25.dll not found..."
- Install Python 2.5.4.msi, default options, restart inkscape, retry - no dice
- copy inkscape's dll to the python folder and retry manual cmd step
Messages:
I can't find font Arial Narrow. I'll use Slim instead
I can't find font Slim. I'll use Slim instead
(...)
ValueError: Cannot find font Slim.

So, python is unable to find a font listed in Windows' control panel? Maybe because it didn't add the localized "standard/bold/italic" like Windows did?

- Use Calibri instead. Calibri is present in Win's font list both undecorated and decorated. No change.
- Use Algerian instead, Algerian comes with no bold and/or italic varaints. No change.
- Try Text-to-Curves. What, Inkscape doesn't have this feature?

I'm out of options. No idea where the font substitution tables are under a current windows.

~suv (suv-lp) wrote :

> Try Text-to-Curves. What, Inkscape doesn't have this feature?

1. Select text
2. menu 'Path > Objects to Path' (Shift+Ctrl+C)
3. If needed, ungroup (Shift+Ctrl+G) and combine (Ctrl+K) the resulting selection.

Alvin Penner (apenner) wrote :

running Windows XP, and Inkscape 0.48.0 r9654 (Aug 16 2010), when I save the file IPSchematic as .wmf I do not get a hangup. This version of Inkscape is using Uniconvertor 1.1.5

Instead I get the message below: I get this message any time I save an object that has a radial gradient fill.

......................................................................................

UniConvertor failed:

Traceback (most recent call last):

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

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

    saver(doc, output_file)

  File "D:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\__init__.py", line 212, in __call__

    module.save(document, file, filename, options)

  File "D:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\export\wmfsaver.py", line 461, in save

    saver.SaveDocument(document)

  File "D:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\export\wmfsaver.py", line 448, in SaveDocument

    self.SaveLayers(doc.Layers())

  File "D:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\export\wmfsaver.py", line 366, in SaveLayers

    self.SaveObjects(layer.GetObjects())

  File "D:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\export\wmfsaver.py", line 353, in SaveObjects

    self.SaveObjects(object.GetObjects())

  File "D:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\export\wmfsaver.py", line 357, in SaveObjects

    self.Ellipse(object)

  File "D:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\export\wmfsaver.py", line 327, in Ellipse

    self.FillStyle(ell.Properties())

  File "D:\Program Files\Inkscape\python\lib\site-packages\sk1libs\filters\export\wmfsaver.py", line 234, in FillStyle

    self.CreateSelectBrush(Props.fill_pattern.gradient.Sample(3)[1])

  File "D:\Program Files\Inkscape\python\lib\site-packages\uniconvertor\app\Graphics\gradient.py", line 91, in Sample

    pos2, color2 = colors[cur]

IndexError: list index out of range

Alvin Penner (apenner) wrote :

if I remove the radial gradients then I get the following wmf file:

Alvin Penner (apenner) wrote :

fwiw, the text problem appears to have been resolved. The attached file has text as text, and can be converted to wmf.

Alvin Penner (apenner) wrote :
Alvin Penner (apenner) wrote :

the result is attached: This conversion did not work previously, using uniconvertor 1.1.4

M8R-98booy (m8r-98booy) wrote :

texttest.svg crahses phyton in my 0.48 release win7 x64.
Crashes with in subprocess.py, same as in bug as reported https://bugs.launchpad.net/inkscape/+bug/656938

(If I just draw a few rectangles, Save Copy As...WMF works.)

Kevin Davies (daviesk24) wrote :

I got the same errors as JazzyNico posted on 2010-04-03 when I opened the testtext.svg image in Inkscape and tried to save a copy as .wmf. I'm running Inkscape 0.47 on Ubuntu 10.04. I've read some of the other threads too and I can't find a solution. I've checked for clipboard managers on my system (there are none), and I've reinstalled both Inkscape and the python-uniconvertor package (I have version 1.1.4-1build1 of that package). I also tried to upgrade to Inkscape 0.48 but I wasn't able to get it to compile correctly.

Is there a solution? Thanks!

~suv (suv-lp) wrote :

Kevin Davies wrote
> the python-uniconvertor package (I have version 1.1.4-1build1 of that package)

You need UniConvertor 1.1.5 for exporting text objects to WMF.

Changed in inkscape (Ubuntu):
status: New → Confirmed
Changed in inkscape (Ubuntu):
importance: Undecided → Medium
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