You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (JIRA)" <ji...@apache.org> on 2019/02/13 05:43:00 UTC

[jira] [Updated] (ARROW-4559) [Python] pyarrow can't read/write filenames with special characters

     [ https://issues.apache.org/jira/browse/ARROW-4559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wes McKinney updated ARROW-4559:
--------------------------------
    Fix Version/s: 0.13.0

> [Python] 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
>            Priority: Major
>             Fix For: 0.13.0
>
>
> 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)