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

pipupgrade --requirements broken on windows #133

Open
davidefortunatotecnos opened this issue Feb 10, 2022 · 1 comment
Open

pipupgrade --requirements broken on windows #133

davidefortunatotecnos opened this issue Feb 10, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@davidefortunatotecnos
Copy link

Description

Hello,
when i try to use pipupgrade with the --requirements param on Windows 10 (the same command works fine on Linux):

pipupgrade --requirements requirements.txt

it raises the following errors:

concurrent.futures.process._RemoteTraceback:
"""
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\process.py", line 243, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\process.py", line 202, in _process_chunk
    return [fn(*args) for args in chunk]
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\process.py", line 202, in <listcomp>
    return [fn(*args) for args in chunk]
  File "C:\NewDev\myproject\venv\lib\site-packages\pipupgrade\model\package.py", line 115, in __init__
    logger.info("Fetching package %s information from DB..." % self.name)
AttributeError: 'Package' object has no attribute 'name'
"""

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

Traceback (most recent call last):
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\process.py", line 243, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\process.py", line 202, in _process_chunk
    return [fn(*args) for args in chunk]
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\process.py", line 202, in <listcomp>
    return [fn(*args) for args in chunk]
  File "C:\NewDev\myproject\venv\lib\site-packages\pipupgrade\commands\helper.py", line 359, in get_registry_from_requirements
    registry = Registry(source = path, packages = packages, sync = sync,
  File "C:\NewDev\myproject\venv\lib\site-packages\pipupgrade\model\registry.py", line 119, in __init__
    for package in pool.imap_unordered(partial(Package, **args), packages):
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\process.py", line 567, in _chain_from_iterable_of_lists
    for element in iterable:
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 608, in result_iterator
    yield fs.pop().result()
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 445, in result
    return self.__get_result()
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 390, in __get_result
    raise self._exception
AttributeError: 'Package' object has no attribute 'name'
"""

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

Traceback (most recent call last):
  File "C:\NewDev\myproject\venv\lib\site-packages\pipupgrade\commands\__init__.py", line 79, in command
    return _command(**ARGUMENTS)
  File "C:\NewDev\myproject\venv\lib\site-packages\pipupgrade\commands\__init__.py", line 237, in _command
    registries    += results
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\process.py", line 567, in _chain_from_iterable_of_lists
    for element in iterable:
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 608, in result_iterator
    yield fs.pop().result()
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 445, in result
    return self.__get_result()
  File "C:\Users\myuser\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 390, in __get_result
    raise self._exception
AttributeError: 'Package' object has no attribute 'name'
2022-02-10 11:44:37,396 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x0000029F26021F90> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...

An 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

Screenshot

No response

Console errors

No response

@davidefortunatotecnos davidefortunatotecnos added the bug Something isn't working label Feb 10, 2022
@achillesrasquinha
Copy link
Owner

This seems to be an issue with some new versions of pip. I believe they've changed the object type for the same.

achillesrasquinha added a commit that referenced this issue Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants