Jean-Christophe Petkovich created ARROW-4559: ------------------------------------------------
Summary: pyarrow can't read/write filenames with special characters Key: ARROW-4559 URL: https://issues.apache.org/jira/browse/ARROW-4559 Project: Apache Arrow Issue Type: Bug Components: Python Affects Versions: 0.12.0 Environment: $ python3 --version Python 3.6.6 $ pip3 freeze | grep -Ei 'pyarrow|pandas' pandas==0.24.1 pyarrow==0.12.0 Reporter: Jean-Christophe Petkovich When writing or reading files to or from paths that have special characters in them, (e.g., "#"), pyarrow returns an error: {code:python} OSError: Passed non-file path... {code} This is a consequence of the following line: https://github.com/apache/arrow/blob/master/python/pyarrow/filesystem.py#L416 File-paths will be parsed as URIs, which will give strange results for filepaths like: "bad # actor.parquet": ParseResult(scheme='', netloc='', path='/tmp/bad ', params='', query='', fragment='actor.parquet') This is trivial to reproduce with the following code which uses the `pd.to_parquet` and `pd.read_parquet` interfaces: {code:python} import pandas as pd x = pd.DataFrame({"a": [1,2,3]}) x.to_parquet("bad # actor.parquet") x.read_parquet("bad # actor.parquet") {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)