Skip to content

issue#94 : casting Windowspath to string. example/tutorials/convert_excel_to_mtg.ipynb #95

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simonakasimon
Copy link

No description provided.

@pradal
Copy link
Contributor

pradal commented Mar 5, 2025

I have developped a fix and merge it in the master/main.
Can you test it on Windows?

@simonakasimon
Copy link
Author

simonakasimon commented Mar 9, 2025

hello,

it is not working because of "AttributeError: 'WindowsPath' object has no attribute split"
maybe it could work using the basename function like :

names=[os.path.basename(filename) for filename in path]

instead of

names=[filename.split(os.sep)[-1].split(".")[0] for filename in path]

but you will need to modify the naming of the files in the path_data function because the basename function keeps the extension in the file name.

you can find out more here : https://stackoverflow.com/questions/8384737/extract-file-name-from-path-no-matter-what-the-os-path-format

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 this pull request may close these issues.

2 participants