storage.content_add() in Debian loader errors with 413 Request Entity Too Large
TypeError: string indices must be integers
File "swh/loader/package/loader.py", line 688, in load
res = self._load_release(p_info, origin)
File "swh/loader/package/loader.py", line 873, in _load_release
(uncompressed_path, directory) = self._load_directory(dl_artifacts, tmpdir)
File "swh/loader/package/loader.py", line 849, in _load_directory
self.storage.content_add(contents)
File "swh/storage/proxies/buffer.py", line 165, in content_add
return self.flush(["content"])
File "swh/storage/proxies/buffer.py", line 292, in flush
stats = add_fn(list(batch))
File "swh/storage/proxies/filter.py", line 58, in content_add
[x for x in content if x.sha256 in contents_to_add]
File "__init__.py", line 329, in wrapped_f
return self.call(f, *args, **kw)
File "__init__.py", line 409, in call
do = self.iter(retry_state=retry_state)
File "__init__.py", line 368, in iter
raise retry_exc.reraise()
File "__init__.py", line 186, in reraise
raise self.last_attempt.result()
File "concurrent/futures/_base.py", line 425, in result
return self.__get_result()
File "concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "__init__.py", line 412, in call
result = fn(*args, **kwargs)
File "swh/storage/proxies/retry.py", line 81, in newf
return getattr(storage, attribute_name)(*args, **kwargs)
File "swh/storage/api/client.py", line 45, in content_add
return self._post("content/add", {"content": content})
File "swh/core/api/__init__.py", line 283, in _post
return self._decode_response(response)
File "swh/core/api/__init__.py", line 365, in _decode_response
self.raise_for_status(response)
File "swh/storage/api/client.py", line 29, in raise_for_status
super().raise_for_status(response)
File "swh/core/api/__init__.py", line 336, in raise_for_status
if exc_type.__name__ == exc_data["type"]:
with:
exc_data
'<html>\r\n<head><title>413 Request Entity Too Large</title></head>\r\n<body bgcolor="white">\r\n<center><h1>413 Request Entity Too Large</h1></center>\r\n<hr><center>nginx/1.14.2</center>\r\n</body>\r\n</html>\r\n'
exc_type
<class 'swh.storage.exc.StorageArgumentException'>
exception
None
response
<Response [413]>
https://sentry.softwareheritage.org/share/issue/dc47c268167e474fbf3696774bc08251/