Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.10.0
Description
Arrow files are binary, but for some reason NativeFile.write silently converts unicode strings to bytes.
>>> b = io.BytesIO() >>> b.write("foo") Traceback (most recent call last): File "<ipython-input-6-a7195dbc0372>", line 1, in <module> b.write("foo") TypeError: a bytes-like object is required, not 'str' >>> f = pa.PythonFile(b) >>> f.write("foo") >>> b.getvalue() b'foo' >>> f.write("😀") >>> b.getvalue() b'foo\xf0\x9f\x98\x80'
Attachments
Issue Links
- links to