Skip to content

short name plugin don't work in debian package

example found in documentation don't work with feed2exec unstable package feed2exec parse https://www.nasa.gov/rss/dyn/breaking_news.rss --output echo --args '{item.title'}

How to reproduce

  1. install unstable package in a stretch system
  2. try feed2exec parse https://www.nasa.gov/rss/dyn/breaking_news.rss --output echo --args '{item.title'} command

Expected behavior

display feed https://www.nasa.gov/rss/dyn/breaking_news.rss

Actual behavior

got an exception

Traceback (most recent call last):
  File "/usr/bin/feed2exec", line 11, in <module>
    load_entry_point('feed2exec==0.10.0', 'console_scripts', 'feed2exec')()
  File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/feed2exec/__main__.py", line 132, in parse
    feed.parse(feed.fetch(), lock=False, force=True)
  File "/usr/lib/python3/dist-packages/feed2exec/feeds.py", line 214, in parse
    if plugins.output(self, item, lock=lock) is not False and not force:  # noqa
  File "/usr/lib/python3/dist-packages/feed2exec/plugins/__init__.py", line 103, in output
    plugin = importlib.import_module(plugin)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'echo'

work with long name plugin feed2exec --verbose parse https://www.nasa.gov/rss/dyn/breaking_news.rss --output feed2exec.plugins.echo --args '{item.title'}

Environment

Please fill in the following information in bug reports, removing the comments like this one in brackets. For feature request, just remove this section.

  • Version: feed2exec, version 0.10.0
  • Operating system: Linux littlegr82 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux
  • Install method: apt install feed2exec feed2exec-doc
  • Minimal configuration file:
$ feed2exec list
Usage: feed2exec [OPTIONS] COMMAND [ARGS]...

Error: No such command "list".
Edited by Antoine Beaupré