voxpupuli/puppetboard

v4 The 'puppetboard' distribution was not found and is required by the application bug

trenta opened this issue · 4 comments

I'm seeing the same issue as #701 without using docker and on version 4.0.1

mod_wsgi (pid=626284): Failed to exec Python script file '/srv/puppetboard/puppetboard/wsgi.py'.
mod_wsgi (pid=626284): Exception occurred processing WSGI script '/srv/puppetboard/puppetboard/wsgi.py'.
Traceback (most recent call last):
  File "/srv/puppetboard/puppetboard/wsgi.py", line 14, in <module>
    from puppetboard.app import app as application
  File "/srv/puppetboard/puppetboard/puppetboard/app.py", line 11, in <module>
    import puppetboard.views.catalogs  # noqa: F401
  File "/srv/puppetboard/puppetboard/puppetboard/views/catalogs.py", line 13, in <module>
    puppetdb = get_puppetdb()
  File "/srv/puppetboard/puppetboard/puppetboard/core.py", line 66, in get_puppetdb
    own_version = pkg_resources.get_distribution("puppetboard").version
  File "/srv/puppetboard/virtenv-puppetboard/lib/python3.8/site-packages/pkg_resources/__init__.py", line 471, in get_distribution
    dist = get_provider(dist)
  File "/srv/puppetboard/virtenv-puppetboard/lib/python3.8/site-packages/pkg_resources/__init__.py", line 347, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/srv/puppetboard/virtenv-puppetboard/lib/python3.8/site-packages/pkg_resources/__init__.py", line 891, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/srv/puppetboard/virtenv-puppetboard/lib/python3.8/site-packages/pkg_resources/__init__.py", line 777, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'puppetboard' distribution was not found and is required by the application

Hi @trenta! Thanks for reporting.

Please provide more info about your setup. In particular:

  • what's your distro and version?
  • how do you install the app?

For example it works for me on:

tgc commented

I see the same issue trying to install puppetboard 4.0.1 with either v8.2.0 or voxpupuli/puppet-puppetboard@f9f1919.
I used the vcsrepo install method on RHEL 8 with the python38* packages including mod_wsgi.

Switching to the pip install method made it work but that prevents me from easily doing customizations with my own fork of puppetboard.

Thanks for more info @tgc

The fix has been released in v4.0.2.

Thanks for that. Sorry about the lack of reply. First day back at work after house move.