@@ -317,7 +317,7 @@ def get_outpath():
317317 "lorena-ThinkPad-E550" : "/home/emma/Desktop/EloiJacomet/data" ,
318318 "tectum" : "/mnt/c/Users/HMARTINEZ/LeCiLab/data/behavioral_data" ,
319319 "tudou" : "/home/kudongdong/data/LeciLab/behavioral_data" ,
320- "nuo-rostower" : "/home/kudongdong /Documents/data/LeciLab/behavioral_data" ,
320+ "nuo-rostower" : "/home/nuo /Documents/data/LeciLab/behavioral_data" ,
321321 "minibaps" : "/archive/training_village" ,
322322 }
323323 return paths .get (hostname , "default/path" )
@@ -408,6 +408,12 @@ def rsync_specific_file(
408408 """
409409 This method syncs the session data from the server to the local machine.
410410 """
411+ if not os .path .isdir (local_path ):
412+ try :
413+ os .makedirs (local_path ) # Creates the directory (and parents if needed)
414+ print (f"Directory '{ local_path } ' created." )
415+ except OSError as e :
416+ print (f"Error creating directory '{ local_path } ': { e } " )
411417 remote_path = f"{ credentials ['username' ]} @{ credentials ['host' ]} :{ file_path } "
412418 rsync_command = f"rsync -avz { remote_path } { local_path } "
413419 result = subprocess .run (rsync_command , shell = True )
@@ -1109,7 +1115,10 @@ def get_previous_row_index(df: pd.DataFrame, current_index) -> int:
11091115 raise IndexError ("No previous row exists for the given index." )
11101116
11111117
1112- def transform_side_choice_to_numeric (side : str ) -> Union [int , float ]:
1118+ def transform_side_choice_to_numeric (side ) -> Union [int , float ]:
1119+ if pd .isna (side ):
1120+ return np .nan
1121+
11131122 match side :
11141123 case "left" :
11151124 return 1
0 commit comments