psss / did

What did you do last week, month, year?
https://did.readthedocs.io/
GNU General Public License v2.0
247 stars 105 forks source link

Invalid plugin redmine #227

Closed lzap closed 4 years ago

lzap commented 4 years ago

Hello,

I upgraded to Fedora 32 and did stopped working:

[lzap@box ~]$ did --debug
 DEBUG  Coloring enabled (COLOR_AUTO)
 DEBUG  Loading Sample Stats group to build Options
 DEBUG  Loading all Stats instance for None
 DEBUG  Loading commits Stats instance for None
 DEBUG  Loading commits-foreman Stats instance for None
 DEBUG  Loading commits-foreman_discovery Stats instance for None
 DEBUG  Loading commits-foreman_bootdisk Stats instance for None
 DEBUG  Loading commits-foreman-selinux Stats instance for None
 DEBUG  Loading commits-foreman-documentation Stats instance for None
 DEBUG  Loading commits-foreman-discovery-image Stats instance for None
 DEBUG  Loading commits-foreman-packaging Stats instance for None
 DEBUG  Loading commits-proxy Stats instance for None
 DEBUG  Loading commits-katello Stats instance for None
 DEBUG  Loading commits-katello-selinux Stats instance for None
 DEBUG  Loading commits-foreman-elasticsearch Stats instance for None
 DEBUG  Loading downstream_67-foreman Stats instance for None
 DEBUG  Loading downstream_67-foreman-selinux Stats instance for None
 DEBUG  Loading downstream_67-foreman_bootdisk Stats instance for None
 DEBUG  Loading downstream_67-foreman_discovery Stats instance for None
 DEBUG  Loading downstream_67-foreman_hooks Stats instance for None
 DEBUG  Loading downstream_67-smart-proxy Stats instance for None
 DEBUG  Loading downstream_66-foreman Stats instance for None
 DEBUG  Loading downstream_66-foreman_bootdisk Stats instance for None
 DEBUG  Loading downstream_66-foreman_discovery Stats instance for None
 DEBUG  Loading downstream_66-foreman_hooks Stats instance for None
 DEBUG  Loading downstream_66-smart-proxy Stats instance for None
 DEBUG  Loading downstream_65-foreman Stats instance for None
 DEBUG  Loading downstream_65-foreman_bootdisk Stats instance for None
 DEBUG  Loading downstream_65-foreman_discovery Stats instance for None
 DEBUG  Loading downstream_65-foreman_hooks Stats instance for None
 DEBUG  Loading downstream_65-hammer_cli_foreman_discovery Stats instance for None
 DEBUG  Loading downstream_65-smart-proxy Stats instance for None
 DEBUG  Loading downstream_64-foreman Stats instance for None
 DEBUG  Loading downstream_64-foreman_bootdisk Stats instance for None
 DEBUG  Loading downstream_64-foreman_discovery Stats instance for None
 DEBUG  Loading downstream_64-foreman_hooks Stats instance for None
 DEBUG  Loading downstream_64-foreman_theme_satellite Stats instance for None
 DEBUG  Loading downstream_64-smart-proxy Stats instance for None
 DEBUG  Loading commits-infoblox Stats instance for None
 DEBUG  Loading github Stats instance for None
 DEBUG  Loading github-issues-created Stats instance for None
 DEBUG  Loading github-issues-closed Stats instance for None
 DEBUG  Loading github-pull-requests-created Stats instance for None
 DEBUG  Loading github-pull-requests-closed Stats instance for None
 DEBUG  Loading github-pull-requests-reviewed Stats instance for None
Traceback (most recent call last):
  File "/usr/bin/did", line 42, in <module>
    did.cli.main()
  File "/usr/lib/python3.8/site-packages/did/cli.py", line 200, in main
    options, header = Options(arguments).parse()
  File "/usr/lib/python3.8/site-packages/did/cli.py", line 71, in __init__
    self.sample_stats = UserStats()
  File "/usr/lib/python3.8/site-packages/did/stats.py", line 187, in __init__
    self.stats = self.configured_plugins(config)
  File "/usr/lib/python3.8/site-packages/did/stats.py", line 220, in configured_plugins
    raise did.base.ConfigError(
did.base.ConfigError: Invalid plugin type 'redmine' in section 'redmine'.

My config is:

[general]
email = lzap@redxxxxxxxxxxhat.com
width = 100

# only full directories can be used: https://github.com/psss/did/issues/178
[commits]
type = git
foreman = /home/lzap/work/foreman
foreman_discovery = /home/lzap/work/foreman_discovery
foreman_bootdisk = /home/lzap/work/foreman_bootdisk
foreman-selinux = /home/lzap/work/foreman-selinux
foreman-documentation = /home/lzap/work/foreman-documentation
foreman-discovery-image = /home/lzap/work/foreman-discovery-image
foreman-packaging = /home/lzap/work/foreman-packaging
proxy = /home/lzap/work/smart-proxy
katello = /home/lzap/work/katello
katello-selinux = /home/lzap/work/katello-selinux
foreman-elasticsearch = /home/lzap/work/foreman-elasticsearch
downstream_67 = /home/lzap/work/gitlab/67satellite/*
downstream_66 = /home/lzap/work/gitlab/66satellite/*
downstream_65 = /home/lzap/work/gitlab/65satellite/*
downstream_64 = /home/lzap/work/gitlab/64satellite/*
infoblox = /home/lzap/work/infoblox

[github]
type = github
url = https://api.github.com/
login = lzapxxxxx

[redmine]
type = redmine
url = https://projects.theforeman.org/
login = 718111111

[bugzilla]
type = bugzilla
prefix = BZ
url = https://bugzilla.redhat.com/xmlrpc.cgi

[gitlab]
type = gitlab
url = https://gitlab.xxxxx.redhat.com
login = lzapxxxxxx
token = xxxxxxxxx
ssl_verify = true

What's exactly wrong here?

lzap commented 4 years ago

I mean, redmine plugin is shipped correctly:

$ rpm -ql did | grep redmine
/usr/lib/python3.8/site-packages/did/plugins/__pycache__/redmine.cpython-38.opt-1.pyc
/usr/lib/python3.8/site-packages/did/plugins/__pycache__/redmine.cpython-38.pyc
/usr/lib/python3.8/site-packages/did/plugins/redmine.py
psss commented 4 years ago

Could you try python -m did.plugins.redmine? Does it show any error?

lzap commented 4 years ago

Aaaah, I remember this bug:

$ python -m did.plugins.redmine
Traceback (most recent call last):
  File "/usr/lib64/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.8/site-packages/did/plugins/redmine.py", line 22, in <module>
    import feedparser
ModuleNotFoundError: No module named 'feedparser'

Installing python3-feedparser.noarch resolved the problem!

lzap commented 3 years ago

JFYI this is till an issue in Fedora 33, the RPM is probably missing a dependency.