achillesrasquinha / pipupgrade

🗽 Like yarn outdated/upgrade, but for pip. Upgrade all your pip packages and automate your Python Dependency Management.
https://git.io/pipupgrade
MIT License
587 stars 28 forks source link

ValueError: `pipupgrade -pip` Failed to initialize project. #159

Open darkstarworks opened 2 months ago

darkstarworks commented 2 months ago

Description

Upgrading pip $\to$ using $\to$ pipupgrade

system info
OS Name Windows 11 Pro
OS Version Build 22631
soft ware
$\large{\textsf{{\color{#ffde57}py}{\color{#4584b6}th}{\color{#646464}on~}}}$ $\normalsize{\textsf{{\color{#737373}~-v}}}$ 3.12.6
$\large{\textsf{{\color{#0073b7}pip~}}}$ $\normalsize{\textsf{{\color{#737373}~-v}}}$ 24.2

Command(s) used

pipupgrade -pip

Console output

PS C:\Users\darks> pipupgrade -pip
←[0;93mChecking...←[0m
←[0;1m←[0;91mpipupgrade | 2024-09-28 00:59:31,108 | ERROR | ←[0mFailed to initialize project for path C:\Users\darks\ip.

concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "C:\Python312\Lib\concurrent\futures\process.py", line 263, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\concurrent\futures\process.py", line 212, in _process_chunk
    return [fn(*args) for args in chunk]
            ^^^^^^^^^
  File "C:\Python312\Lib\site-packages\pipupgrade\model\project.py", line 16, in from_path
    project = Project(path, *args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\pipupgrade\model\project.py", line 24, in __init__
    raise ValueError("Path %s does not exist." % path)
ValueError: Path C:\Users\darks\ip does not exist.
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\pipupgrade\commands\__init__.py", line 79, in command
    return _command(**ARGUMENTS)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\pipupgrade\commands\__init__.py", line 207, in _command
    requirements += flatten(map(lambda p: p.requirements, project))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\bpyutils\util\array.py", line 67, in flatten
    flattened = list(chainer(*arr))
                     ^^^^^^^^^^^^^
  File "C:\Python312\Lib\concurrent\futures\process.py", line 642, in _chain_from_iterable_of_lists
    for element in iterable:
                   ^^^^^^^^
  File "C:\Python312\Lib\concurrent\futures\_base.py", line 619, in result_iterator
    yield _result_or_cancel(fs.pop())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\concurrent\futures\_base.py", line 317, in _result_or_cancel
    return fut.result(timeout)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\concurrent\futures\_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\concurrent\futures\_base.py", line 401, in __get_result
    raise self._exception
ValueError: Path C:\Users\darks\ip does not exist.

←[0;91mAn error occured while performing the above command. This could be an issue with
"pipupgrade". Kindly post an issue at https://github.com/achillesrasquinha/pipupgrade/issues←[0m

lines: 3 Failed to initialize project for path C:\Users\darks\ip. 48 ValueError: Path C:\Users\darks\ip does not exist.

Stevenalenga commented 1 week ago

uninstall in install pip again using the command pip uninstall pipupgrade pip install pipupgrade

check the directory is correct as well