You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Handle pagination of results with more than 10,000 results gracefully #1506
Gracefully handle this lack of x-total and x-total-pages header, either by limiting the results to 10,000 responses, or allowing a user to manually set the _list._total and _list._total_pages values.
@property
def total_pages(self) -> int:
"""The total number of pages."""
if TYPE_CHECKING:
assert self._total_pages is not None
return int(self._total_pages)
Activity
JohnVillalovos commentedon Jun 10, 2021
I tried the above code and I didn't have an exception occur. I iterated to about 16,000+ issues before I broke out of the program.
VenkatsQuest commentedon Nov 10, 2021
This is the call stack , hope this information is helpful to fix the issue,
/Users/anil/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages/gitlab/client.py
/Users/anil/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages/gitlab/base.py
/Users/anil/PycharmProjects/pythonProject/main.py
iterator_projects = gl.projects.list(owned=True, as_list=False , pagination="keyset", order_by="id")
nejch commentedon Jan 4, 2022
Reproduced in #1788 and fixed in #1773.