Skip to content

[Python] test failure in io.rst #140

@pitrou

Description

@pitrou

make pytest gives me the following error:

**********************************************************************
File "io.rst", line 511, in default
Failed example:
    import pyarrow as pa
    import pyarrow.dataset as ds

    ds.write_dataset(data, "./partitioned", format="parquet",
                     partitioning=ds.partitioning(pa.schema([("year", pa.int16())])))
Exception raised:
    Traceback (most recent call last):
      File "/home/antoine/miniconda3/envs/cookbook/lib/python3.9/doctest.py", line 1336, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest default[0]>", line 4, in <module>
        ds.write_dataset(data, "./partitioned", format="parquet",
      File "/home/antoine/miniconda3/envs/cookbook/lib/python3.9/site-packages/pyarrow/dataset.py", line 878, in write_dataset
        _filesystemdataset_write(
      File "pyarrow/_dataset.pyx", line 3408, in pyarrow._dataset._filesystemdataset_write
      File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
    pyarrow.lib.ArrowInvalid: Could not write to ./partitioned as the directory is not empty and existing_data_behavior is to error
**********************************************************************

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonThis issues is specific to the python language cookbook

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions