-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automagically load necessary Python modules for extensions registered in nwb-extensions #1143
Comments
…ing exception with AIBS_ecephys listed missing Ultimate solution should IMHO be implemented within PyNWB itself. See NeurodataWithoutBorders/pynwb#1143 feature request. Also related - dedicated exception (NeurodataWithoutBorders/pynwb#1144) With this change we should be able to deal with neuropixels files from Allen
@yarikoptic By way of background, one solution we are developing for this is the The registry should provide information about how to install the necessary extension, but I really don't want to
|
I think for this specific error we should provide a few details on how to potentially resolve it, i.e., either use load_namespaces and or install the appropriate extensions.
I think the the first step is to actually use information from the file. I.e., we could check if an appropriate namespace is in the file and indicate this to user as part of the error message. For the second part of checking the registry, I think rather than making this as part of the error checking, this should be a separate utility to allow users to search the registry based on information from the file (e.g,. look for names of namespaces or possibly even neurodata_types). Since this will a) require online access and b) potentially take some time, I think this should be a separate step. However, this is a step we could mention in the error message to indicate that they may want to use additional functionality to locate and install extensions. |
It might be that it is already intended, but found no issue yet, thus decided to be the one to "report" since I found no mentioning of nwb-extensions among issues or in the code.
ATM,
NWBHDF5IO(...).read()
would fail with an exception like'AIBS_ecephys' not a namespace"
leaving user baffled on "what have I done wrong?" or "how do I fix that?". If registry (I am still not sure if it captures all necessary information ATM) had provided listing of those "name spaces" and (Python) modules which need to be installed, then PyNWB would automagicallyimport allensdk.brain_observatory.ecephys.nwb
while.read()
ing that file. And ifimport
fails, it would provide an error message likeWithout such functionality, IMHO it would be pretty much impossible to develop generic PyNWB-based tools otherwise agnostic of underlying neural data types.
edit: in dandi/dandi-cli#36 I for now provide a prototypical workaround only for AIBS_ecephys for now
The text was updated successfully, but these errors were encountered: