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

Dataset Import in Windows OS #12

Open
mwleklin opened this issue Mar 25, 2021 · 2 comments
Open

Dataset Import in Windows OS #12

mwleklin opened this issue Mar 25, 2021 · 2 comments

Comments

@mwleklin
Copy link

For windows users of python library I found that the datasets did not import correctly.

image

It appears the problem is related to the usage of splitting functions in the file path
Within the init.py for the datsets sections the following code is executed. How the data is being split is dependent on the OS being used and this creates the issues for me.
datasets_list = []
for dir_name in glob.glob(f"{home}/dataset_*"):
dir_name = dir_name.split("/")[-1][8:]
datasets_list.append(dir_name)

I changed the code to use only os

datasets_list = []
for dir_name in os.scandir(home):
if 'dataset_' in os.path.split(dir_name)[-1][:8]:
dir_name = os.path.split(dir_name)[-1][8:]
datasets_list.append(dir_name)

I think this problem could occur in other locations and I'll update the bug as I see it

@choudharynirmal
Copy link

Hi, I also faced the same problem. Change the line number 66 in init file of surface as
surface_name = dir_name.split('\')[-1][8:]

Do the same in planner, model init files.

@rileyhickman
Copy link
Contributor

Hello both,

Thank you for correcting this bug for Windows users. Would you be willing to let me know a comprehensive list of instances within Olympus where this bug seems to occur? I can correct them in the next version of the code.

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

No branches or pull requests

3 participants