This fixed the UnicodeDecodeError for me on python 3, while still working for python 2 (I wanted to profile a function to see the difference in performance between python 2 and 3 today .. :-)).
Just putting it up here, as I am not sure this is a good approach (bytes and strings in web things is not really my cup of tea).
I now read in the files as bytes, so everything is bytes on both python 2 and 3. Only the json.dumps returns a string in python 3, so that still has to be converted to bytes.
This fixed the UnicodeDecodeError for me on python 3, while still working for python 2 (I wanted to profile a function to see the difference in performance between python 2 and 3 today .. :-)).
Just putting it up here, as I am not sure this is a good approach (bytes and strings in web things is not really my cup of tea). I now read in the files as bytes, so everything is bytes on both python 2 and 3. Only the
json.dumps
returns a string in python 3, so that still has to be converted to bytes.