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

AssertionError: Set as part of preparation during download #12168

Closed
1 task done
engineerpassion opened this issue Jul 20, 2023 · 3 comments
Closed
1 task done

AssertionError: Set as part of preparation during download #12168

engineerpassion opened this issue Jul 20, 2023 · 3 comments
Labels
resolution: duplicate Duplicate of an existing issue/PR

Comments

@engineerpassion
Copy link

Description

Error while checking conflicts during package installations.

#9 415.6 ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
#9 415.6 Traceback (most recent call last):
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 575, in _determine_conflicts
#9 415.6     return check_install_conflicts(to_install)
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/operations/check.py", line 108, in check_install_conflicts
#9 415.6     would_be_installed = _simulate_installation_of(to_install, package_set)
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/operations/check.py", line 131, in _simulate_installation_of
#9 415.6     dist = abstract_dist.get_metadata_distribution()
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/distributions/wheel.py", line 23, in get_metadata_distribution
#9 415.6     assert self.req.local_file_path, "Set as part of preparation during download"
#9 415.6 AssertionError: Set as part of preparation during download

Expected behavior

The installation to pass successfully.

pip version

23.2

Python version

3.10

OS

CentOS

How to Reproduce

It fails while building wheels from a package that has source distribution.

Output

#9 415.6 ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
#9 415.6 Traceback (most recent call last):
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 575, in _determine_conflicts
#9 415.6     return check_install_conflicts(to_install)
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/operations/check.py", line 108, in check_install_conflicts
#9 415.6     would_be_installed = _simulate_installation_of(to_install, package_set)
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/operations/check.py", line 131, in _simulate_installation_of
#9 415.6     dist = abstract_dist.get_metadata_distribution()
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/distributions/wheel.py", line 23, in get_metadata_distribution
#9 415.6     assert self.req.local_file_path, "Set as part of preparation during download"
#9 415.6 AssertionError: Set as part of preparation during download
#9 415.6 ERROR: Exception:
#9 415.6 Traceback (most recent call last):
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
#9 415.6     status = run_func(*args)
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
#9 415.6     return func(self, options, args)
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 452, in run
#9 415.6     installed = install_given_reqs(
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/req/__init__.py", line 72, in install_given_reqs
#9 415.6     requirement.install(
#9 415.6   File "/usr/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 805, in install
#9 415.6     assert self.local_file_path
#9 415.6 AssertionError

Code of Conduct

@engineerpassion engineerpassion added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jul 20, 2023
@pfmoore
Copy link
Member

pfmoore commented Jul 20, 2023

Please provide a way of reproducing this, including the full command line and the package(s) involved.

If you are using the legacy resolver, please confirm if using the standard resolver fixes the issue - there is a known issue with the legacy resolver.

@sodul
Copy link

sodul commented Jul 20, 2023

I got the same error. Unfortunately I cannot share details of packages involved publicly.

This is on macOS Ventura, M1 CPU, pip 23.2 and Python 3.11.4.

The command was:

python3 -m pip -q --cache-dir=/tmp/cache install --use-deprecated=legacy-resolver -r requirements.txt
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
  File "/Users/stephane/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 575, in _determine_conflicts
    return check_install_conflicts(to_install)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stephane/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pip/_internal/operations/check.py", line 108, in check_install_conflicts
    would_be_installed = _simulate_installation_of(to_install, package_set)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stephane/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pip/_internal/operations/check.py", line 131, in _simulate_installation_of
    dist = abstract_dist.get_metadata_distribution()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stephane/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pip/_internal/distributions/wheel.py", line 23, in get_metadata_distribution
    assert self.req.local_file_path, "Set as part of preparation during download"
AssertionError: Set as part of preparation during download
ERROR: Exception:
Traceback (most recent call last):
  File "/Users/stephane/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/Users/stephane/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stephane/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 452, in run
    installed = install_given_reqs(
                ^^^^^^^^^^^^^^^^^^^
  File "/Users/stephane/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pip/_internal/req/__init__.py", line 72, in install_given_reqs
    requirement.install(
  File "/Users/stephane/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pip/_internal/req/req_install.py", line 805, in install
    assert self.local_file_path
AssertionError

@uranusjr
Copy link
Member

Duplicate of #12156

@uranusjr uranusjr marked this as a duplicate of #12156 Jul 21, 2023
@uranusjr uranusjr closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2023
@uranusjr uranusjr added resolution: duplicate Duplicate of an existing issue/PR and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Jul 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

4 participants