Bug#852290: inkscape: saving as "optimised SVG" fails, due to error when importing scourString
Dear Mattia, Thanks for picking up the issue on such short notice. I saw the issue and patch on launchpad, I'll be following and awaiting that issue as well to see how and when the problem is resolved. Mattia Rizzolo wrote: >> I have implemented the following patch locally to work around the >> problem: >> >> --- /usr/share/inkscape/extensions/scour.inkscape.py~ >> +++ /usr/share/inkscape/extensions/scour.inkscape.py >> @@ -6,3 +6,6 @@ >> import scour >> -from scour.scour import scourString >> +try: >> +from scour.scour import scourString >> +except Exception as e: > If anything, this should catch inly ImportError over all of Exception > (besides, there is no need to keep the exception info in the 'e' > variable here). You are obviously correct, there is no need to catch every exception or to store it in `e`. I guess I was lazy in implementing the fix, and duplicated the `except` statement from two lines below (I implemented the change when I quickly needed a fix, submitted the report about an hour later). > Thank you again for your bug! I am just a user, I'm sure I don't deserve a lot of credit. :-) Thanks again for the effort and the quick action. Kind regards, Tim.
Bug#852290: inkscape: saving as "optimised SVG" fails, due to error when importing scourString
Mattia Rizzolo wrote: > Note that it can't be workarounded in the packaging side by backporting > the newer python-scour and forcing an higher version, as python-scour is > only "Recommend"ed, and versioned recomends are not really considered. Not directly, but you can still enforce higher versions by using a Breaks relation against the older version. - Fabian
Bug#852290: inkscape: saving as "optimised SVG" fails, due to error when importing scourString
Control: notfound -1 0.92.0-3~bpo8+1 Control: found -1 0.92.0-2 Control: retitle -1 inkscape: fails with older python-scour (as found in jessie) On Mon, Jan 23, 2017 at 11:19:46AM +0100, Tim Wienk wrote: > Package: inkscape > Version: 0.92.0-3~bpo8+1 > > Please note, this bug only applies to Debian Jessie (using inkscape from > jessie-backports and python-scour from jessie - there is no backported > version of python-scour). Thanks for the bug report! Unfortunately the Debian bug tracker doesn't really know about backports, but anyway, this is (should, haven't yet tried myself) actually a bug reproducible in the unstable version of inkscape with just a older version of python-scour. Note that it can't be workarounded in the packaging side by backporting the newer python-scour and forcing an higher version, as python-scour is only "Recommend"ed, and versioned recomends are not really considered. > When saving as an optimised SVG, inkscape uses the scour library to > optimise the SVG. An error is reported when doing so, triggered by > importing `scourString` from `scour.scour`. > > The problem is most likely a result of a change in the python-scour > package: > > - In package version 0.26-3 (jessie), scour.py exists as: > /usr/lib/python2.7/dist-packages/scour.py > - In package version 0.32-2 (stretch), scour.py exists as: > /usr/lib/python2.7/dist-packages/scour/scour.py Thank you for the analysis! > I have implemented the following patch locally to work around the > problem: > > --- /usr/share/inkscape/extensions/scour.inkscape.py~ > +++ /usr/share/inkscape/extensions/scour.inkscape.py > @@ -6,3 +6,6 @@ > import scour > -from scour.scour import scourString > +try: > +from scour.scour import scourString > +except Exception as e: If anything, this should catch inly ImportError over all of Exception (besides, there is no need to keep the exception info in the 'e' variable here). > +from scour import scourString > except Exception as e: I'll forward this upstream soon. Thank you again for your bug! -- regards, Mattia Rizzolo GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`. more about me: https://mapreri.org : :' : Launchpad user: https://launchpad.net/~mapreri `. `'` Debian QA page: https://qa.debian.org/developer.php?login=mattia `- signature.asc Description: PGP signature
Bug#852290: inkscape: saving as "optimised SVG" fails, due to error when importing scourString
Package: inkscape Version: 0.92.0-3~bpo8+1 Severity: normal Dear Maintainer, Please note, this bug only applies to Debian Jessie (using inkscape from jessie-backports and python-scour from jessie - there is no backported version of python-scour). When saving as an optimised SVG, inkscape uses the scour library to optimise the SVG. An error is reported when doing so, triggered by importing `scourString` from `scour.scour`. The problem is most likely a result of a change in the python-scour package: - In package version 0.26-3 (jessie), scour.py exists as: /usr/lib/python2.7/dist-packages/scour.py - In package version 0.32-2 (stretch), scour.py exists as: /usr/lib/python2.7/dist-packages/scour/scour.py I have implemented the following patch locally to work around the problem: --- /usr/share/inkscape/extensions/scour.inkscape.py~ +++ /usr/share/inkscape/extensions/scour.inkscape.py @@ -6,3 +6,6 @@ import scour -from scour.scour import scourString +try: +from scour.scour import scourString +except Exception as e: +from scour import scourString except Exception as e: Thanks for the continued work and effort on maintaining this package. Kind regards, Tim. -- System Information: Debian Release: 8.7 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable'), (50, 'testing'), (10, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.8.0-0.bpo.2-amd64 (SMP w/8 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages inkscape depends on: ii libaspell150.60.7~20110707-1.3 ii libatk1.0-02.14.0-1 ii libatkmm-1.6-1 2.22.7-2.1 ii libc6 2.19-18+deb8u7 ii libcairo2 1.14.0-2.1+deb8u2 ii libcairomm-1.0-1 1.10.0-1.1 ii libcdr-0.1-1 0.1.0-3 ii libdbus-1-31.8.22-0+deb8u1 ii libdbus-glib-1-2 0.102-1 ii libfontconfig1 2.11.0-6.3+deb8u1 ii libfreetype6 2.5.2-3+deb8u1 ii libgc1c2 1:7.2d-6.4 ii libgcc11:4.9.2-10 ii libgdk-pixbuf2.0-0 2.31.1-2+deb8u5 ii libglib2.0-0 2.42.1-1+b1 ii libglibmm-2.4-1c2a 2.42.0-1 ii libgomp1 4.9.2-10 ii libgsl0ldbl1.16+dfsg-2 ii libgtk2.0-02.24.25-3+deb8u1 ii libgtkmm-2.4-1c2a 1:2.24.4-1.1 ii libgtkspell0 2.0.16-1.1 ii libjpeg62-turbo1:1.3.1-12 ii liblcms2-2 2.6-3+b3 ii libmagick++-6.q16-58:6.8.9.9-5+deb8u6 ii libmagickcore-6.q16-2 8:6.8.9.9-5+deb8u6 ii libmagickwand-6.q16-2 8:6.8.9.9-5+deb8u6 ii libpango-1.0-0 1.36.8-3 ii libpangocairo-1.0-01.36.8-3 ii libpangoft2-1.0-0 1.36.8-3 ii libpangomm-1.4-1 2.34.0-1.1 ii libpng12-0 1.2.50-2+deb8u3 ii libpoppler-glib8 0.26.5-2+deb8u1 ii libpoppler46 0.26.5-2+deb8u1 ii libpopt0 1.16-10 ii libpotrace01.12-1+deb8u1 ii librevenge-0.0-0 0.0.1-3 ii libsigc++-2.0-0c2a 2.4.0-1 ii libstdc++6 4.9.2-10 ii libvisio-0.1-1 0.1.0-2 ii libwpg-0.3-3 0.3.0-3 ii libx11-6 2:1.6.2-3 ii libxml22.9.1+dfsg1-5+deb8u4 ii libxslt1.1 1.1.28-2+deb8u2 ii python 2.7.9-1 pn python:any ii zlib1g 1:1.2.8.dfsg-2+b1 Versions of packages inkscape recommends: ii aspell0.60.7~20110707-1.3 ii imagemagick 8:6.8.9.9-5+deb8u6 pn libimage-magick-perl pn libwmf-bin ii python-lxml 3.4.0-1 ii python-numpy 1:1.8.2-2 ii python-scour 0.26-3 pn transfig Versions of packages inkscape suggests: ii dia 0.97.3-1 pn libsvg-perl pn libxml-xql-perl pn pstoedit pn python-uniconvertor ii ruby 1:2.1.5+deb8u2 -- no debconf information