-
Notifications
You must be signed in to change notification settings - Fork 179
Open
Description
System information
- Python 3.12.8
- perceval==1.3.1
Issue description
When downloading Bugzilla data, the request fails with the error:
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://bugzilla.mozilla.org/rest/bug?last_change_time=2023-02-09T03%3A28%3A55Z&limit=25&order=changeddate&include_fields=_all&offset=25&api_key=<your-bugzilla-api-key>
When executing the URL in the browser, it returns an error as well, however if you increase the offset by amount x (in this example offset=40), it works again.
Steps to reproduce the issue
from perceval.backends.core.bugzillarest import BugzillaREST
from datetime import datetime
if __name__ == '__main__':
init_args={
'url': 'https://bugzilla.mozilla.org',
'api_key': '<your-bugzilla-api-key>',
'max_bugs': 25,
}
fetch_args={
'from_date': datetime(2023, 1, 1)
}
backend = BugzillaREST(**init_args)
iterator = backend.fetch(**fetch_args)
for i, issue in enumerate(iterator):
print('i')What's the expected result?
- The fetch function should increment offset by amount x until the request returns data again.
- Or take
offsetas initial kwarg in thefetchfunction, so the users can skip it themselves.
What's the actual result?
- The fetch function stops with an errro
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels