Bug#852290: inkscape: saving as "optimised SVG" fails, due to error when importing scourString

Mattia Rizzolo mattia at debian.org
Mon Jan 23 10:41:18 UTC 2017


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  `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20170123/6af07b3f/attachment.sig>


More information about the pkg-multimedia-maintainers mailing list