univie-datamining-team3 / assignment2

Analysis of mobility data
MIT License
0 stars 0 forks source link

Preprocessing: file not found error on Windows #15

Closed Lumik7 closed 6 years ago

Lumik7 commented 6 years ago

Running make_dataset.py --download False --preprocessing True introduces a file not found error on Windows due to this code snippet in Preprocessing.preprocess() :

if filename is not None:
                with open("../../data/" + filename, "wb") as file:
                    file.write(pickle.dumps(preprocessed_data))

because the "/" is not supported.

Lumik7 commented 6 years ago

I will fix this bug by using os.path.join syntax and using setup_directory to make sure the directory exists.

Lumik7 commented 6 years ago

The bug has been fixed. The saving process is now OS independent. Close issue

rmitsch commented 6 years ago

Sorry, didn't think of that. Thanks for the fix.

Lumik7 commented 6 years ago

no problem, forgot to fix the same bug in restore_preprocessed_data_from_disk. This is fixed now as well