Skip to content

Commit f1ef941

Browse files
committed
refactor deprecated pandas load ssv loader
1 parent 2326a91 commit f1ef941

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ibllib/io/raw_data_loaders.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def load_stim_position_screen(session_path):
330330
path = Path(session_path).joinpath("raw_behavior_data")
331331
path = next(path.glob("_iblrig_stimPositionScreen.raw*.csv"), None)
332332

333-
data = pd.read_csv(path, sep=',', header=None, error_bad_lines=False)
333+
data = pd.read_csv(path, sep=',', header=None, on_bad_lines='skip')
334334
data.columns = ['contrast', 'position', 'bns_ts']
335335
data['bns_ts'] = pd.to_datetime(data['bns_ts'])
336336
return data
@@ -385,7 +385,7 @@ def _load_encoder_ssv_file(file_path, **kwargs):
385385
if file_path.stat().st_size == 0:
386386
_logger.error(f"{file_path.name} is an empty file. ")
387387
raise ValueError(f"{file_path.name} is an empty file. ABORT EXTRACTION. ")
388-
return pd.read_csv(file_path, sep=' ', header=None, error_bad_lines=False, **kwargs)
388+
return pd.read_csv(file_path, sep=' ', header=None, on_bad_lines='skip', **kwargs)
389389

390390

391391
def _load_encoder_positions_file_lt5(file_path):

0 commit comments

Comments
 (0)