Closed mohamadamin-fjz closed 1 year ago
@mohamadamin-fjz please provide a stack trace. Thanks.
i use these codes and google colab !pip install allensdk
import os import numpy as np import pandas as pd import matplotlib.pyplot as plt from allensdk.brain_observatory.ecephys.ecephys_project_cache import EcephysProjectCache
output_dir = '/local1/ecephys_cache_dir/'
manifest_path = os.path.join(output_dir, "manifest.json")
cache = EcephysProjectCache.from_warehouse(manifest=manifest_path)
print(cache.get_all_session_types())
sessions=cache.get_session_table() brain_obs_session=sessions[sessions['session_type']=='brain_observatory_1.1'] session_id=715093703 session=cache.get_session_data(715093703)
session.stimulus_presentations ###this line of code cause bellow error ERROR: values should be boolean numpy array. Use the 'pd.array' function instead
@aamster
I think that it is because of the latest updates of allensdk , I was using 2.14.1 version but this problem resolved when I use 2.13.6 version. @aamster
Should I report it as a bug or I am missing the point? @aamster
Please try updating pandas version by using
pip install pandas --upgrade
thanks it works:)
@aamster Hi, I'm having the same error when calling get_stimulus_table() on a brain observatory session. Pandas version is 1.3.5 and upgrading it doesn't seem to resolve the issue ("Requirement already satisfied"). allensdk version is 2.15.1. Any ideas of what the issue might be? Thanks!
pandas 1.3.5 is not the latest. Try starting from a fresh environment. Sorry, I'm not able to help further.
@aamster Thanks. I've reinstalled multiple times. One question: which python version do you recommend installing with? It is not stated in the installation guide: https://allensdk.readthedocs.io/en/latest/install.html. I have been using python=3.7 based on this file https://github.com/AllenInstitute/AllenSDK/blob/master/.readthedocs.yml, but do you recommend another version? Thanks.
3.7 - 3.9 are supported in the 2.15.1 release on pypi https://pypi.org/project/allensdk/ if you look on the left side of the page
@aamster Okay perfect. With python 3.8, I've resolved the error, and the pandas version is 1.5.3. I couldn't seem to upgrade pandas past 1.3.5 with python=3.7. Thank you for your help!
Hi everybody I m using Allen SDK to access brain observatory data. I try to load the stimulus presentation data frame with asession.stimulus_presentations command but I get error:values should be boolean NumPy array. Use the ‘pd.array’ function instead I will happy if anyone helps me to resolve the issue