Skip to content

AttributeError: 'NoneType' object has no attribute 'resolve_hashes' #304

@lcarva

Description

@lcarva

Given this requirements.txt file:

pytz==2025.2 \
    --hash=sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3 \
    --hash=sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00
    # via -r ./packages/pytz/requirements.in

Running pybuild-deps compile fails:

$ pybuild-deps compile --generate-hashes ./packages/pytz/requirements.txt --output-file ./packages/pytz/requirements-build.txt
Traceback (most recent call last):
  File "/home/lucarval/.virtualenvs/pip-tools/bin/pybuild-deps", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/lucarval/.virtualenvs/pip-tools/lib/python3.12/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lucarval/.virtualenvs/pip-tools/lib/python3.12/site-packages/click/core.py", line 1363, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/lucarval/.virtualenvs/pip-tools/lib/python3.12/site-packages/click/core.py", line 1830, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lucarval/.virtualenvs/pip-tools/lib/python3.12/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lucarval/.virtualenvs/pip-tools/lib/python3.12/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lucarval/.virtualenvs/pip-tools/lib/python3.12/site-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lucarval/src/hermetoproject/pybuild-deps/src/pybuild_deps/scripts/compile.py", line 115, in compile
    hashes = compiler.resolver.resolve_hashes(results) if generate_hashes else None
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'resolve_hashes'

I'm running this in an virtual env with the following installed:

build==1.2.2.post1
certifi==2025.4.26
charset-normalizer==3.4.2
click==8.2.1
idna==3.10
packaging==25.0
pip-tools==7.4.1
-e git+https://github.com/hermetoproject/pybuild-deps.git@aecf8836ae885a7b67aa92e5ac2732a6ebc0da18#egg=pybuild_deps
pyproject_hooks==1.2.0
requests==2.32.4
setuptools==80.9.0
urllib3==2.4.0
wheel==0.45.1
xdg==6.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions