neurogeriatricskiel / NGMT

Python based toolbox for processing motion data
https://neurogeriatricskiel.github.io/NGMT/
Other
6 stars 1 forks source link

AttributeError: 'WindowsPath' object has no attribute 'find' for importer #77

Closed JuliusWelzel closed 2 months ago

JuliusWelzel commented 2 months ago

The importer for KeepControl allows Path object as inputs but uses a find right in the beginning. (https://github.com/neurogeriatricskiel/NGMT/blob/da867ab99e6d5b3b402bc989bc10f819a80f1392/ngmt/datasets/keepcontrol.py#L27 https://github.com/neurogeriatricskiel/NGMT/blob/da867ab99e6d5b3b402bc989bc10f819a80f1392/ngmt/datasets/keepcontrol.py#L53

@rmndrs89, could you please have a look and fix this?

rmndrs89 commented 2 months ago

Do a check whether file_name is a str or a pathlib.Path, and maybe at the beginning change it so that it is always the same type.

JuliusWelzel commented 2 months ago

+1 thanks for the suggestions @rmndrs89. In general we should keep it consistent across the toolbox. I would propose all paths or file names are always pathlib objects.

masoudabedinifar commented 2 months ago

Dear @rmndrs89 and @JuliusWelzel I handled in this way: 4cfcde8b644cc911aedd4c737d45454306f926b2 , could you please check it?