Skip to content

Pathnames with "." cause file_name error in get_writer. #115

Closed
@markp2

Description

@markp2

The current version of get_writer:

https://github.com/pyexcel/pyexcel-io/blob/1caf894d0a3fda2e7392984690aead654c17464c/pyexcel_io/writers/csv_sheet.py#L50C22-L50C22

performs a split on the assumption there is just one dot "." in the pathname e.g. some_path .csv

However, in my application, I am passing in a path that includes a dot '"."

mark/.local/share/file.csv

Therefore I believe that the split on line 50 should; be right-split limited to 1 split:

names = self._native_book.split("."). -> names = self._native_book.rsplit(".", 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions