cortex-lab / PinkRigs

Shared code for processing data on the pink rigs
3 stars 1 forks source link

queryCSV errors when no files match condition #22

Closed Timothysit closed 1 year ago

Timothysit commented 1 year ago

In the queryCSV function here:

https://github.com/cortex-lab/PinkRigs/blob/1d77f021930fca839120238ee02202005e6835c1/Analysis/helpers/queryExp.py

if exp2checkList is empty, then the line

exp2checkList = pd.concat(exp2checkList) errors, eg. if I call this function from run_facemapy.py to look for the last10 active mice and there are no active mice, then it crashes. It will be good to have it return an empty dataframe or None so the downstream code can deal with it.

Thanks!

takacsflora commented 1 year ago

thanks for flagging this up, should be fixed now