Closed fzakaria closed 1 year ago
Some random old version of Python used to append newlines to its output. I think base64 requires newline termination. The json module rejects binary data. The code was also manually constructing the JSON as it was written before json in Python existed! In any event I have a commit that strips whitespace from base64 output and uses the json module to encode all other values. Ticket remains open because it still needs test cases.
I have the following table:
Hitting this issue:
Here is the line of code causing the problem:
I think the problem is that we are encoding 0 bytes but trying to access the last element. It should probably guard against that.
Let me know if you want me to take a stab at the PR.