Page MenuHomeSoftware Heritage

pypi / package loader: handle dangling branches
Closed, MigratedEdits Locked

Description

We got this error in prod:

  File "swh/loader/package/pypi/tasks.py", line 14, in load_pypi
    return PyPILoader.from_configfile(url=url).load()
  File "swh/loader/package/loader.py", line 572, in load
    branch.target for branch in last_snapshot.branches.values()
  File "swh/loader/package/loader.py", line 572, in <setcomp>
    branch.target for branch in last_snapshot.branches.values()
AttributeError: 'NoneType' object has no attribute 'target'

while loading this project, it seems: https://pypi.org/project/clod/