Bug 2151715 - python3-pipdeptree+graphviz doesn't work
Summary: python3-pipdeptree+graphviz doesn't work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pipdeptree
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Lumír Balhar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-07 21:41 UTC by Sajith Sasidharan
Modified: 2022-12-18 01:40 UTC (History)
2 users (show)

Fixed In Version: python-pipdeptree-2.3.1-1.fc37
Clone Of:
Environment:
Last Closed: 2022-12-18 01:40:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sajith Sasidharan 2022-12-07 21:41:43 UTC
Description of problem:

On Fedora 37, I installed python3-pipdeptree+graphviz and tried to run it like so, but it didn't work:

```
$ pipdeptree 
Traceback (most recent call last):
  File "/usr/bin/pipdeptree", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/pipdeptree.py", line 878, in main
    tree = PackageDAG.from_pkgs(pkgs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pipdeptree.py", line 290, in from_pkgs
    pkgs = [DistPackage(p) for p in pkgs]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pipdeptree.py", line 290, in <listcomp>
    pkgs = [DistPackage(p) for p in pkgs]
            ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pipdeptree.py", line 149, in __init__
    super(DistPackage, self).__init__(obj)
  File "/usr/lib/python3.11/site-packages/pipdeptree.py", line 109, in __init__
    self.project_name = obj.project_name
                        ^^^^^^^^^^^^^^^^
AttributeError: 'PathDistribution' object has no attribute 'project_name'
```


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. install python3-pipdeptree+graphviz-2.2.1-4.fc37.noarch
2. run pipdeptree

Actual results:

The program exits with an error message

Expected results:

Do not exit with an error message. :)

Additional info:

Comment 1 Lumír Balhar 2022-12-09 13:57:06 UTC
You are 100% correct. Thanks for the report. It seems that the problem is already fixed upstream but, unfortunately, we cannot update to the latest version in Fedora 37 because we don't have the latest pip and pytest there.

I'm gonna try to find a version of pipdeptree that I can build in Fedora 37 and contains the fix for the mentioned problem.

Comment 2 Fedora Update System 2022-12-09 15:11:01 UTC
FEDORA-2022-6cf24b3784 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-6cf24b3784

Comment 3 Lumír Balhar 2022-12-09 15:12:32 UTC
Could you please test the update and give it karma points if it fixes the problem for you? It works fine for me on Fedora 37.

Comment 4 Sajith Sasidharan 2022-12-09 21:22:02 UTC
Installed python3-pipdeptree-2.3.1-1.fc37.noarch.rpm, can confirm that doesn't quit with that error message anymore. Thank you!

(My original problem was that `pipdeptree --graph-output` doesn't work within a virtual env, which is where it is most useful for me.  It fails with the error message "graphviz functionality is not supported when querying non-host python", regardless of how I installed it.  But that is not a Fedora issue...)

Comment 5 Fedora Update System 2022-12-10 02:48:43 UTC
FEDORA-2022-6cf24b3784 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-6cf24b3784`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-6cf24b3784

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2022-12-18 01:40:24 UTC
FEDORA-2022-6cf24b3784 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


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