int-brain-lab / ONE

Open Neurophysiology Environment
MIT License
16 stars 4 forks source link

Can't download the data about TAG = '2022_Q2_IBL_et_al_RepeatedSite' #73

Closed YEYUMIN closed 1 year ago

YEYUMIN commented 1 year ago

Hello, an error occurred when I downloaded the data. Can you help me.

code: sessions_rep_site = one.alyx.rest('sessions', 'list', dataset_types='spikes.times', tag='2022_Q2_IBL_et_al_RepeatedSite') session = sessions_rep_site[0]

ins_str_query = 'datasetstagsname,2022_Q2_IBL_et_al_RepeatedSite' sessions_rep_site = one.alyx.rest('insertions', 'list', django=ins_str_query)

eid = session['id'] insertion = sessions_rep_site[0] probe_label = insertion['name'] files = one.load_collection(eid, f'alf/{probe_label}/pykilosort', download_only=True)

error report

TypeError Traceback (most recent call last)

in 1 insertion = sessions_rep_site[0] 2 probe_label = insertion['name'] ----> 3 files = one.load_collection(eid, f'alf/{probe_label}/pykilosort', download_only=True) 4 5 # Show where files have been downloaded to d:\softwares\study\anconda\install\lib\site-packages\one\util.py in wrapper(self, *args, **kwargs) 167 if not mode or mode == 'auto': 168 mode = self.mode --> 169 self.refresh_cache(mode=mode) 170 return method(self, *args, **kwargs) 171 d:\softwares\study\anconda\install\lib\site-packages\one\api.py in refresh_cache(self, mode) 216 pass 217 elif mode == 'auto': --> 218 if datetime.now() - self._cache['_meta']['loaded_time'] >= self.cache_expiry: 219 _logger.info('Cache expired, refreshing') 220 self.load_cache() TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'NoneType'
mayofaulkner commented 1 year ago

Hi, please could you do the following to confirm that you have set up your connection to ONE correctly

from one.api import ONE
one = ONE(base_url='https://openalyx.internationalbrainlab.org', \
          password='international', silent=True)
print(one)
YEYUMIN commented 1 year ago

OK. I tried, and this is what happened.

One (online, https://openalyx.internationalbrainlab.org)

YEYUMIN commented 1 year ago

Thank you very much. I use another editor and it's work!