Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
markp2 opened this issue Jan 13, 2024 · 1 comment · Fixed by #116
Closed

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

markp2 opened this issue Jan 13, 2024 · 1 comment · Fixed by #116

Comments

@markp2
Copy link

markp2 commented Jan 13, 2024

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)

@ShaheedHaque
Copy link
Contributor

Would having a PR help get this issue fixed/released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants