guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inkscape export errors


From: Ekaitz Zarraga
Subject: Re: Inkscape export errors
Date: Tue, 20 Oct 2020 17:51:09 +0000

> For optimized SVG, the error is due to missing the package scour, which
> I meant to report, but was just reminded of because of your email.
>
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
> /usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning:
> the imp module is deprecated in favour of importlib; see the module's
> documentation for alternative uses import fnmatch, glob, traceback,
> errno, sys, atexit, locale, imp Traceback (most recent call last): File
> "output_scour.py", line 11, in <module> import scour
> ModuleNotFoundError: No module named 'scour'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "output_scour.py", line 17, in <module>
>
>     """)
>
>
> inkex.utils.DependencyError: Failed to import module 'scour'.
> Please make sure it is installed (e.g. using 'pip install scour'
> or 'sudo apt-get install python-scour') and try again.
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> --
>
> Thorsten Wilms t_w_@freenet.de

Hi, thanks for the feedback.

I tried to replicate that and I can't.

I made some research. Yours is passing the "import inkex" line because it's 
able to load `lxml`.
The first question I'd like to make is: why?

If you check the code of the extensions under `output_scour.py`[^1] file:


``` python
#!/usr/bin/env python
"""
Run the scour module on the svg output.
"""

from distutils.version import StrictVersion

import inkex

try:
    import scour
    from scour.scour import scourString
except ImportError:
    raise inkex.DependencyError("""Failed to import module 'scour'.
Please make sure it is installed (e.g. using 'pip install scour'
  or 'sudo apt-get install python-scour') and try again.
""")
```

Yours is failing in the try-except block, in the `import scour` and mine fails 
before, in the `import inkex` line.

Any thoughts about why is this happening?

I tried to add python-lxml as a dep but it doesn't solve the import in any case.

Ideas?

Ekaitz

[^1]: https://gitlab.com/inkscape/extensions/-/blob/1.0.x/output_scour.py



reply via email to

[Prev in Thread] Current Thread [Next in Thread]