Bug 1601767 - pbr VersionInfo: ImportError: No module named pkg_resources
Summary: pbr VersionInfo: ImportError: No module named pkg_resources
Keywords:
Status: CLOSED EOL
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-pbr
Version: 13.0 (Queens)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: hguemar
QA Contact: Shai Revivo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-17 08:16 UTC by Cyril Lopez
Modified: 2023-11-08 04:25 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-10 17:32:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-15159 0 None None None 2022-05-11 17:17:10 UTC

Description Cyril Lopez 2018-07-17 08:16:24 UTC
Description of problem:

vbmc command line doesn't work

Version-Release number of selected component (if applicable):
python2-virtualbmc-1.2.0-1.1.el7ost

How reproducible:
/bin/vbmc --help or add or list...


Actual results:
version.py:438:_get_version_from_pkg_resources:ImportError: No module named pkg_resources

Traceback (most recent call last):
  File "/bin/vbmc", line 6, in <module>
    from virtualbmc.cmd.vbmc import main
  File "/usr/lib/python2.7/site-packages/virtualbmc/__init__.py", line 15, in <module>
    __version__ = pbr.version.VersionInfo('virtualbmc').version_string()
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 466, in version_string
    return self.semantic_version().brief_string()
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 461, in semantic_version
    self._semantic = self._get_version_from_pkg_resources()
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 438, in _get_version_from_pkg_resources
    import pkg_resources
ImportError: No module named pkg_resources



Additional info:

Comment 1 Cyril Lopez 2018-07-17 08:17:53 UTC
Workaround : install python-setuptools-0.9.8-7.el7.noarch package.

I thinks here we miss a dependency with python-setuptools

Comment 2 Dmitry Tantsur 2018-07-17 08:44:48 UTC
Seems like it's a pbr bug, since pbr is importing the missing module.

Comment 4 Haïkel Guémar 2018-07-18 15:32:31 UTC
Assigned to my RH account (too lazy to switch accounts /o\)

Comment 5 Dmitry Tantsur 2018-07-18 15:35:38 UTC
Please paste the version of pbr you had when seeing this problem.

Comment 6 Cyril Lopez 2018-07-18 15:51:22 UTC
pbr ?
python2-pbr-3.1.1-2.el7ost.noarch ?

Comment 7 Haïkel Guémar 2018-07-18 16:10:49 UTC
Reproducible with python-pbr-4.1.0-1.fc29, fixed in python-pbr-4.1.0-2.fc29 (rawhide)

Backport is in preparation for RDO.

Comment 8 Fedora Update System 2018-07-18 16:41:39 UTC
python-pbr-3.1.1-8.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c93eb32ca7

Comment 9 Fedora Update System 2018-07-19 20:20:48 UTC
python-pbr-3.1.1-8.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c93eb32ca7

Comment 10 Haïkel Guémar 2018-07-20 13:53:43 UTC
It's now in pike/queens/rocky testing repositories.

Comment 15 Christopher Brown 2018-11-09 12:16:30 UTC
Please can we get this fixed, it has been dragging on since OSP 11, each closed for incorrect reasons in the following bz:

1522652
1419720

Here is the patch for RDO:

https://review.rdoproject.org/r/#/c/4961/

which has been rejected saying it needs to get fixed in pbr.

Comment 16 Christopher Brown 2018-11-09 12:27:30 UTC
I've created a new patch:

https://review.rdoproject.org/r/17322

Thanks

Comment 18 Mike Burns 2019-01-21 20:49:31 UTC
The referenced version is fixed in OSP 14 (4.1.0-2)

Comment 20 Lon Hohberger 2023-07-10 17:32:08 UTC
OSP13 support officially ended on 27 June 2023

Comment 21 Red Hat Bugzilla 2023-11-08 04:25:06 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.