Bug 1583331
| Summary: | diffoscope does not run at all; says python-magic is not available | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Andrew Gunnerson <accounts+fedora> |
| Component: | diffoscope | Assignee: | Zbigniew Jędrzejewski-Szmek <zbyszek> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 28 | CC: | accounts+fedora, dhiru, fschwarz, jmmahler, ntl, redhat.c2zyt, zbyszek |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | diffoscope-95-2.fc28 diffoscope-100-1.fc29 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-10-10 22:45:29 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
I have the same issue. Workaround: $ pip3 install --user python-magic The "python3-magic" package apparently is not the "python-magic" package that diffoscope needs. The latter does not seem to be packaged in Fedora? It seems like there are two modules named "magic" (one is https://github.com/ahupp/python-magic which also uses the module identifier "python-magic"). From a quick look at the code it seems that diffoscope can use both (comparators/utils/file.py). So we just need to remove the explicit setuptools dependency on "python-magic". This should be done by patching setup.py. As a quick workaround you can delete that line in /usr/lib/python3.6/site-packages/diffoscope-91-py3.6.egg-info/requires.txt . This bug is still in Fedora 29 Beta as of today.
# dnf install diffoscope
# diffoscope
Traceback (most recent call last):
File "/usr/bin/diffoscope", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3095, in <module>
@_call_aside
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3079, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 570, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 888, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 774, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'python-magic' distribution was not found and is required by diffoscope
Can be fixed by putting a `#` in the line that says `python-magic`:
# vim /usr/lib/python3.7/site-packages/diffoscope-98-py3.7.egg-info/requires.txt
diffoscope-95-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-9ae27e45aa diffoscope-100-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-69cac24b55 diffoscope-100-1.fc29 has been pushed to the Fedora 29 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-69cac24b55 diffoscope-95-2.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-9ae27e45aa Can confirm that this works on fedora 29: $ lsb_release -d && diffoscope --help | head -1 Description: Fedora release 29 (Twenty Nine) usage: diffoscope [--debug] [--debugger] [--status-fd FD] [--progress] diffoscope-95-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. diffoscope-100-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report. |
Description of problem: Whenever I run diffoscope, it seems that it is unable to find python-magic, even though I have the python3-magic package installed (stacktrace included below). Version-Release number of selected component (if applicable): diffoscope-91-1.fc28.noarch python3-magic-5.33-5.fc28.noarch How reproducible: Always Steps to Reproduce: 1. Install diffoscope 2. Run diffoscope with any arguments Additional info: [/tmp] diffoscope Traceback (most recent call last): File "/usr/bin/diffoscope", line 6, in <module> from pkg_resources import load_entry_point File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3095, in <module> @_call_aside File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3079, in _call_aside f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 570, in _build_master ws.require(__requires__) File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 888, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 774, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'python-magic' distribution was not found and is required by diffoscope [/tmp] rpm -q python3-magic python3-magic-5.33-5.fc28.noarch [/tmp]