svg_and_media_zip_output.py crashed in write() because of wrong character encoding

Bug #232216 reported by Elias Kuthe
14
Affects Status Importance Assigned to Milestone
inkscape (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: inkscape

According to the Traceback report, inkscape uses the "latin-1" encoding when collecting images for export as compressed SVG with media (*.zip). But on Ubuntu the default character encoding for filenames is "utf-8".

Ubuntu Version: 8.04
Inkscape Version: 0.46 (Apr 7 2008) in Ubuntu Package inkscape0.46-0ubuntu2

ProblemType: Crash
Architecture: i386
Date: Tue May 20 15:33:08 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/share/inkscape/extensions/svg_and_media_zip_output.py
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: fglrx
Package: inkscape 0.46-0ubuntu2
PackageArchitecture: i386
ProcCmdline: python /usr/share/inkscape/extensions/svg_and_media_zip_output.py /tmp/ink_ext_XXXXXXH4LKBU
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=de_DE.UTF-8
PythonArgs: ['/usr/share/inkscape/extensions/svg_and_media_zip_output.py', '/tmp/ink_ext_XXXXXXH4LKBU']
SourcePackage: inkscape
Title: svg_and_media_zip_output.py crashed with OSError in write()
Uname: Linux 2.6.24-16-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy lpadmin netdev plugdev powerdev scanner src video

Tags: apport-crash
Revision history for this message
Elias Kuthe (elias-kuthe) wrote :
Changed in inkscape:
importance: Undecided → Medium
Revision history for this message
Bryce Harrington (bryce) wrote :

A pre-release of the upcoming Inkscape 0.47 is now available in Ubuntu
Karmic for testing. Because *so* much stuff has changed compared with
the version you reported your bug against, would you mind re-testing
this new version and see if this bug is now resolved?

Karmic Alpha CD ISO images are available at:

  http://cdimage.ubuntu.com/releases/karmic/

If you're not testing Karmic yet, there are .debs of this new Inkscape
for Jaunty, Hardy, and Intrepid here:

  https://launchpad.net/~inkscape.testers/+archive/ppa

You might find further bugs when testing this alpha release. If that is
the case, please file a NEW bug report here:

   https://edge.launchpad.net/inkscape/+filebug

Thanks ahead of time for your testing efforts, and enjoy the new Inkscape!

Changed in inkscape (Ubuntu):
status: New → Incomplete
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

I am unable to reproduce this bug using karmic alpha 4. I tried the following steps:

* Draw a rectangle
* From the menu, select "File->Save"
* Choose "Compressed Inkscape SVG with media (*.zip)" from the file type drop-down list
* Enter "drawing.zip" as the filename and press the "save" button.

If you used a different procedure to cause the bug, please let me know.

$ lsb_release -rd
Description: Ubuntu karmic (development branch)
Release: 9.10

$ apt-cache policy inkscape
inkscape:
  Installed: 0.47~pre1-0ubuntu1
  Candidate: 0.47~pre1-0ubuntu1
  Version table:
 *** 0.47~pre1-0ubuntu1 0
        500 http://gb.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Elias Kuthe (elias-kuthe) wrote : Re: [Bug 232216] Re: svg_and_media_zip_output.py crashed in write() because of wrong character encoding

The script
( /usr/share/inkscape/extensions/svg_and_media_zip_output.py ) changed
from 0.46 to 0.47 but the bug still exists (for different reasons). To
reproduce the bug using jaunty with inkscape 0.47 I do the following:

* From the menu, select "File->Import" and take an image with a space in
  the file name like "my image.jpg"
* Menu: "File->Save"
* Chose "Compressed Inkscape SVG with media (*.zip)" as file type
After pressing "save" I end up in with the message "Could not locate
file: file:///home/elias/BugReports/inkscape/my%20image.jpg"

The reason is, that inkscape translates the space into the sequence %20
and the python script, wich saves it, does not retranslates into a space
again.
This is the same with other foreign characters like the German umlaute
äöü.

$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04

$ apt-cache policy inkscape
inkscape:
  Installiert: 0.47~pre0-0ubuntu1~9.04
  Kandidat: 0.47~pre0-0ubuntu1~9.04
  Versions-Tabelle:
 *** 0.47~pre0-0ubuntu1~9.04 0
        100 /var/lib/dpkg/status
     0.46-5ubuntu4 0
        500 http://de.archive.ubuntu.com jaunty/main Packages

Am Dienstag, den 25.08.2009, 11:56 +0000 schrieb Alex Valavanis:
> I am unable to reproduce this bug using karmic alpha 4. I tried the
> following steps:
>
> * Draw a rectangle
> * From the menu, select "File->Save"
> * Choose "Compressed Inkscape SVG with media (*.zip)" from the file type drop-down list
> * Enter "drawing.zip" as the filename and press the "save" button.
>
> If you used a different procedure to cause the bug, please let me know.
>
> $ lsb_release -rd
> Description: Ubuntu karmic (development branch)
> Release: 9.10
>
> $ apt-cache policy inkscape
> inkscape:
> Installed: 0.47~pre1-0ubuntu1
> Candidate: 0.47~pre1-0ubuntu1
> Version table:
> *** 0.47~pre1-0ubuntu1 0
> 500 http://gb.archive.ubuntu.com karmic/main Packages
> 100 /var/lib/dpkg/status
>

Changed in inkscape (Ubuntu):
status: Incomplete → New
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

I still can't reproduce this bug using inkscape 0.47 on Karmic. The image is correctly located and displays properly. I've attached the successfully saved archive.

Also, it seems like this is a duplicate of bug #456248, so I'll mark it as such. Please feel free to unmark it if I'm mistaken!

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Actually, I'll mark this as being fixed because the original crash has been fixed. Please could we continue the discussion about the character encoding issues at bug #456248? I've marked that bug as affecting Ubuntu

Changed in inkscape (Ubuntu):
status: New → 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.