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
When attempting to read a file stored on AWS S3 using Django’s FieldFile object, the file content is returned as an empty binary string (b''), despite the file existing and having a non-zero size.
Steps to Reproduce
Example Recap Document id: 102021417
In [26]: r.filepath_local
Out[26]: <FieldFile: recap/gov.uscourts.cacd.683100/gov.uscourts.cacd.683100.178.0.pdf>
In [27]: r.filepath_local.read()
Out[27]: b''
In [28]: r.filepath_local.size
Out[28]: 100549
Expected Results
The content of the file should be read and returned as a non-empty binary string.
Actual Results
The FieldFile.read() method returns an empty binary string (b'').
This is causing the extract recap into op crash - somewhere in the micro service because obviously it's sending zero bytes and its crashing it.
On the good news front the retry works as expected for timeouts of legitimate failures of DOCTOR although I want to bump it to 5 retries at least from 3.
@mlissner if you have any insights into how this could be occurring I would appreciate it.
The text was updated successfully, but these errors were encountered:
Summary
When attempting to read a file stored on AWS S3 using Django’s FieldFile object, the file content is returned as an empty binary string (b''), despite the file existing and having a non-zero size.
Steps to Reproduce
Example Recap Document id:
102021417
Expected Results
The content of the file should be read and returned as a non-empty binary string.
Actual Results
The FieldFile.read() method returns an empty binary string (b'').
This is causing the extract recap into op crash - somewhere in the micro service because obviously it's sending zero bytes and its crashing it.
On the good news front the retry works as expected for timeouts of legitimate failures of DOCTOR although I want to bump it to 5 retries at least from 3.
@mlissner if you have any insights into how this could be occurring I would appreciate it.
The text was updated successfully, but these errors were encountered: