Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2020 resolver runtime bug: get_topological_weights sanity checks fail #8959

Closed
luofanghao opened this issue Oct 5, 2020 · 6 comments
Closed

Comments

@luofanghao
Copy link

What did you want to do?

Due to some corporate packages included. So I cannot list the requirements here. sorry about that

Output

ERROR: Exception:                           
Traceback (most recent call last):       
  File "/opt/bb/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 228, in _main
    status = self.run(options, args)     
  File "/opt/bb/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)        
  File "/opt/bb/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 378, in run
    to_install = resolver.get_installation_order(
  File "/opt/bb/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 191, in get_installation_order
    weights = get_topological_weights(graph)
  File "/opt/bb/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 242, in get_topological_weights
    assert len(weights) == len(graph)
AssertionError 

Additional information

I checked that:

len(weights) is 50 and len(graph) is 51

@pradyunsg
Copy link
Member

Hi, thanks for filing this issue.

I don't think anything can be done here without information about what the graph looks like here. Please share the contents of the graph -- output of print(graph) would be necessary to even attempt to address this issue.

@pradyunsg pradyunsg added the S: awaiting response Waiting for a response/more information label Oct 6, 2020
@luofanghao
Copy link
Author

okay so I did print the graph and weights, here is what I found:
so the extra element in graph is the vertice "zope-interface", which is not shown in the weights.
and in the graph object:

>>> graph._forwards["zope-interface"]
{'<Python from Requires-Python>'}
>>> graph._backwards["zope-interface"]
set()

hope these are helpful. Let me know if you want to know more information!

@no-response no-response bot removed the S: awaiting response Waiting for a response/more information label Oct 6, 2020
@pradyunsg
Copy link
Member

No, it's not. I can't figure out what's wrong without the entire graph.

Could you please sanitize the names of the packages and share the graph?

@pradyunsg pradyunsg added the S: awaiting response Waiting for a response/more information label Oct 6, 2020
@no-response
Copy link

no-response bot commented Oct 21, 2020

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@no-response no-response bot closed this as completed Oct 21, 2020
@aaugustin
Copy link

I have a minimal reproduction that results in the same error in #9155.

@pradyunsg
Copy link
Member

#9031 was where this was discussed at length and fixed.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2021
@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants