Bug 1889080 - [abrt] python3-rpm-generators: module(): pythondistdeps.py:105:<module>:ImportError: cannot import name 'Distribution' from 'pkg_resources' (unknown location)
Summary: [abrt] python3-rpm-generators: module(): pythondistdeps.py:105:<module>:Impor...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rpm-generators
Version: 31
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Orsava
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:c3112c29c97cd4046ea091f72b9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-17 14:29 UTC by Jeff MacDonald
Modified: 2020-11-03 20:43 UTC (History)
8 users (show)

Fixed In Version: python-rpm-generators-11-12.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-03 20:43:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (2.18 KB, text/plain)
2020-10-17 14:29 UTC, Jeff MacDonald
no flags Details
File: cpuinfo (2.22 KB, text/plain)
2020-10-17 14:29 UTC, Jeff MacDonald
no flags Details
File: environ (3.83 KB, text/plain)
2020-10-17 14:29 UTC, Jeff MacDonald
no flags Details
File: mountinfo (2.33 KB, text/plain)
2020-10-17 14:29 UTC, Jeff MacDonald
no flags Details
File: namespaces (172 bytes, text/plain)
2020-10-17 14:29 UTC, Jeff MacDonald
no flags Details
File: open_fds (265 bytes, text/plain)
2020-10-17 14:29 UTC, Jeff MacDonald
no flags Details

Description Jeff MacDonald 2020-10-17 14:29:11 UTC
Version-Release number of selected component:
python3-rpm-generators-9-2.fc31

Additional info:
reporter:       libreport-2.13.1
cgroup:         0::/user.slice/user-1000.slice/user/gnome-terminal-server.service
cmdline:        /usr/bin/python3 /usr/lib/rpm/pythondistdeps.py --provides --majorver-provides
crash_function: module
exception_type: ImportError
executable:     /usr/lib/rpm/pythondistdeps.py
interpreter:    python3-3.7.9-1.fc31.x86_64
kernel:         5.8.11-100.fc31.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
pythondistdeps.py:105:<module>:ImportError: cannot import name 'Distribution' from 'pkg_resources' (unknown location)

Traceback (most recent call last):
  File "/usr/lib/rpm/pythondistdeps.py", line 105, in <module>
    from pkg_resources import Distribution, FileMetadata, PathMetadata, Requirement
ImportError: cannot import name 'Distribution' from 'pkg_resources' (unknown location)

Local variables in innermost frame:
__name__: '__main__'
__doc__: None
__package__: None
__loader__: <_frozen_importlib_external.SourceFileLoader object at 0x7f83292addd0>
__spec__: None
__annotations__: {}
__builtins__: <module 'builtins' (built-in)>
__file__: '/usr/lib/rpm/pythondistdeps.py'
__cached__: None
print_function: _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536)
getopt: <function getopt at 0x7f832925eef0>
basename: <function basename at 0x7f8329271e60>
dirname: <function dirname at 0x7f8329271ef0>
isdir: <function isdir at 0x7f8329271560>
sep: '/'
argv: ['/usr/lib/rpm/pythondistdeps.py', '--provides', '--majorver-provides']
stdin: <_io.TextIOWrapper name='<stdin>' mode='r' encoding='UTF-8'>
version: '3.7.9 (default, Aug 19 2020, 17:05:11) \n[GCC 9.3.1 20200408 (Red Hat 9.3.1-2)]'
get_python_lib: <function get_python_lib at 0x7f83291d40e0>
warn: <built-in function warn>
opts: [('--provides', ''), ('--majorver-provides', '')]
args: []
Provides: True
Requires: False
Recommends: False
Conflicts: False
Extras: False
Provides_PyMajorVer_Variant: True
PyMajorVer_Deps: False
legacy_Provides: False
legacy: False
o: '--majorver-provides'
a: ''
py_abi: False
py_deps: {}
files: ['/home/jam/projects/ttyio3/build/bdist.linux-x86_64/rpm/BUILDROOT/ttyio3-20201002-1.x86_64/usr/lib/python3.7/site-packages/ttyio3-20201002-py3.7.egg-info\n']
f: '/home/jam/projects/ttyio3/build/bdist.linux-x86_64/rpm/BUILDROOT/ttyio3-20201002-1.x86_64/usr/lib/python3.7/site-packages/ttyio3-20201002-py3.7.egg-info'
lower: '/home/jam/projects/ttyio3/build/bdist.linux-x86_64/rpm/buildroot/ttyio3-20201002-1.x86_64/usr/lib/python3.7/site-packages/ttyio3-20201002-py3.7.egg-info'
name: 'python(abi)'
lower_dir: '/home/jam/projects/ttyio3/build/bdist.linux-x86_64/rpm/buildroot/ttyio3-20201002-1.x86_64/usr/lib/python3.7/site-packages'

Comment 1 Jeff MacDonald 2020-10-17 14:29:14 UTC
Created attachment 1722310 [details]
File: backtrace

Comment 2 Jeff MacDonald 2020-10-17 14:29:14 UTC
Created attachment 1722311 [details]
File: cpuinfo

Comment 3 Jeff MacDonald 2020-10-17 14:29:15 UTC
Created attachment 1722312 [details]
File: environ

Comment 4 Jeff MacDonald 2020-10-17 14:29:16 UTC
Created attachment 1722313 [details]
File: mountinfo

Comment 5 Jeff MacDonald 2020-10-17 14:29:17 UTC
Created attachment 1722314 [details]
File: namespaces

Comment 6 Jeff MacDonald 2020-10-17 14:29:18 UTC
Created attachment 1722315 [details]
File: open_fds

Comment 7 Miro Hrončok 2020-10-17 18:52:47 UTC
1. How do you trigger this error?
2. Does it happen repeatedly?
3. Have you ever used `sudo pip` to install, remove or upgrade Python packages?
4. What is the output of: `python3 -c 'import pkg_resources; print(pkg_resources.__file__)'`

Comment 8 Jeff MacDonald 2020-10-18 16:19:25 UTC
1. How do you trigger this error?

I do not remember

2. Does it happen repeatedly?

so far it has happened only once

3. Have you ever used `sudo pip` to install, remove or upgrade Python packages?

yes

4. What is the output of: `python3 -c 'import pkg_resources; print(pkg_resources.__file__)'

[~] [12:17pm] [jam@cyclops] % python3 -c 'import pkg_resources; print(pkg_resources.__file__)'
/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py

Comment 9 Miro Hrončok 2020-10-18 19:49:09 UTC
I suggest to stick the -s flag to the shebang of the generator script to avoid this kind of problems in the future, WDYT Tomáš?

Comment 10 Tomas Orsava 2020-10-19 10:47:54 UTC
(In reply to Miro Hrončok from comment #9)
> I suggest to stick the -s flag to the shebang of the generator script to
> avoid this kind of problems in the future, WDYT Tomáš?

Yeah, good idea. I'll open a PR.

Comment 12 Ben Cotton 2020-11-03 16:45:55 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 Miro Hrončok 2020-11-03 20:43:25 UTC
This should not happen again on rawhide. I don't plan to actively backport the enhancement.


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