Page MenuHomeSoftware Heritage

list-gitlab-full on gitlab.com crashes with: TypeError: 'NoneType' object cannot be interpreted as an integer
Closed, MigratedEdits Locked

Description

I scheduled a listing for gitlab.com for the docker env: swh scheduler --url http://localhost:5008/ task add list-gitlab-full -p oneshot api_baseurl=https://gitlab.com/api/v4

And the lister errors with:

swh-lister_1                  | Traceback (most recent call last):
swh-lister_1                  |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
swh-lister_1                  |     R = retval = fun(*args, **kwargs)
swh-lister_1                  |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/scheduler/task.py", line 45, in __call__
swh-lister_1                  |     return super().__call__(*args, **kwargs)
swh-lister_1                  |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
swh-lister_1                  |     return self.run(*args, **kwargs)
swh-lister_1                  |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/lister/gitlab/tasks.py", line 48, in full_gitlab_relister
swh-lister_1                  |     ranges = list(utils.split_range(total_pages, NBPAGES))
swh-lister_1                  |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/lister/utils.py", line 8, in split_range
swh-lister_1                  |     for index in range(0, total_pages, nb_pages):
swh-lister_1                  | TypeError: 'NoneType' object cannot be interpreted as an integer

I'm using the master version of the lister