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
If returning a list-like object, MarkLogic can return a multipart document, one part per returned value.
For an empty list, it returns zero parts (i.e. no bytes). Requests Toolbelt crashes in this instance, because the assumption that a content type must exist at all is violated.
File /usr/local/lib/python3.9/site-packages/caselawclient/Client.py:29 in decode_multipart
multipart_data = decoder.MultipartDecoder.from_response(response)
File /usr/local/lib/python3.9/site-packages/requests_toolbelt/multipart/decoder.py:156 in from_response
return cls(content, content_type, encoding)
File /usr/local/lib/python3.9/site-packages/requests_toolbelt/multipart/decoder.py:110 in __init__
self._find_boundary()
File /usr/local/lib/python3.9/site-packages/requests_toolbelt/multipart/decoder.py:114 in _find_boundary
ct_info = tuple(x.strip() for x in self.content_type.split(';'))
AttributeError: 'NoneType' object has no attribute 'split'
If returning a list-like object, MarkLogic can return a multipart document, one part per returned value.
For an empty list, it returns zero parts (i.e. no bytes). Requests Toolbelt crashes in this instance, because the assumption that a content type must exist at all is violated.
We got around this by hardcoding that no content means zero items returned, but this feels like a thing worth solving at the library level.
our workaround: https://github.com/nationalarchives/ds-caselaw-custom-api-client/pull/99/files
The text was updated successfully, but these errors were encountered: