SpikeInterface / spikeinterface

A Python-based module for creating flexible and robust spike sorting pipelines.
https://spikeinterface.readthedocs.io
MIT License
533 stars 187 forks source link

Dev-branch: Bug in `load_waveforms` for `waveforms_extractor_backwards_compatibility.py` #2505

Closed zm711 closed 9 months ago

zm711 commented 9 months ago

https://github.com/SpikeInterface/spikeinterface/blob/69d1f9a3db9ada72812204ca25012efec5c1ff40/src/spikeinterface/core/waveforms_extractor_backwards_compatibility.py#L334-L342

This fails because it returns the function which evaluates as truth-y

It should be

(folder / "spikeinterface_info.json").exists():

This evaluated as true and then failed in one of my datasets.

cc: @alejoe91 @samuelgarcia

alejoe91 commented 9 months ago

Good catch!

samuelgarcia commented 9 months ago

Thanks. I fix it in #2502