read_tsv file error
when I use default setting, which r+b, to open tsv file, error occurs like _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?) in line "for item in reader:" when I use r+ TypeError: expected bytes-like object, not str. occur at np.frombuffer(base64.decodestring(item[field]), my environment in windows. should it matter?
I'm afraid none of this is tested on windows, you might have to do your own research on this one, sorry!
I faced the same issue in Ubuntu-GNOME. Later, I found out that this TypeError is not necessarily caused because of the OS platform but it's due to the Python version itself. This error appears for Python 3.x versions; Try to run the script as is using Python 2:
python2 read_tsv.py
And that should work!
which proto have you used? Thanks.
after 1.changing the open mode to "r" or "rt": with open(infile, "r") as tsv_in_file 2.changing base64.decodestring(item[field]) to base64.decodebytes(bytes(item[field], encoding="utf8"))
It can work.
after 1.changing the open mode to "r" or "rt":
with open(infile, "r") as tsv_in_file2.changingbase64.decodestring(item[field])tobase64.decodebytes(bytes(item[field], encoding="utf8"))It can work.
these are boxes extracted from the file, the number looks so weirdly large, did you get the same as i am?
code from Ruotian Luo
this code seems work well

after 1.changing the open mode to "r" or "rt":
with open(infile, "r") as tsv_in_file2.changingbase64.decodestring(item[field])tobase64.decodebytes(bytes(item[field], encoding="utf8"))It can work.these are boxes extracted from the file, the number looks so weirdly large, did you get the same as i am?
As far as I can remember, my boxes feature don't have this problem, it just like the result of Ruotian Luo. But I don't have the source tsv file now, so I'm not very sure.
