SpikeInterface / spikeinterface

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

AttributeError: module 'spikeinterface.extractors' has no attribute 'RecordingExtractor' #3423

Open Chiara-toschi opened 2 months ago

Chiara-toschi commented 2 months ago

Apologies if this is super naive, I'm kind of new to python, I'm using someone else's code to do some analyses.

I run

import spikeinterface.extractors as se

and then further down in the code:

def get_amp_files(self) -> (se.RecordingExtractor, pd.Series):

and get this error:

in AmplifierChannels
    def get_amp_files(self) -> (se.RecordingExtractor, pd.Series):
AttributeError: module 'spikeinterface.extractors' has no attribute 'RecordingExtractor'

I'm running Version: 0.95.1 of spikeinterface and cannot update it because I think everything else will break

zm711 commented 2 months ago

That's pretty old. Sorry you can't update. @alejoe91 or @samuelgarcia would have to comment on the older side of the api. The best advice would honestly be to update in general. If you're new to python maybe this could be a learning experience to update the code while learning :) We are pretty responsive to questions as they come up!

chrishalcrow commented 2 months ago

If you do think of updating your version, we have some good beginner resources. You could try working through the quickstart tutorial (https://spikeinterface.readthedocs.io/en/latest/get_started/quickstart.html) or download this Jupyter notebook from a recently conference in Edinburgh (https://github.com/SpikeInterface/SpikeInterface-Training-Edinburgh-May24/blob/main/overview_tutorials/main_tutorial.ipynb), which covers similar material.