Skip to content
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

Update with newer ndx-template version #26

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

alessandratrapani
Copy link
Collaborator

Update with newer ndx-template version as suggested in #23

@rly
Copy link
Contributor

rly commented Dec 18, 2024

I get a slightly different error when I try to reproduce this locally:

________________________________________________________ ERROR collecting src/pynwb/tests/test_constructors.py _________________________________________________________
src/pynwb/tests/test_constructors.py:7: in <module>
    from ndx_microscopy.testing import (
src/pynwb/ndx_microscopy/__init__.py:25: in <module>
    ExcitationLightPath = get_class("ExcitationLightPath", extension_name)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/utils.py:672: in func_call
    return func(**pargs)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/pynwb/__init__.py:260: in get_class
    return __TYPE_MAP.get_dt_container_cls(neurodata_type, namespace)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/utils.py:668: in func_call
    return func(args[0], **pargs)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/build/manager.py:537: in get_dt_container_cls
    spec = self.__ns_catalog.get_spec(namespace, data_type)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/utils.py:668: in func_call
    return func(args[0], **pargs)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/spec/namespace.py:316: in get_spec
    return self.__namespaces[namespace].get_spec(data_type)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/utils.py:668: in func_call
    return func(args[0], **pargs)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/spec/namespace.py:150: in get_spec
    raise ValueError("No specification for '%s' in namespace '%s'" % (data_type, self.name))
E   ValueError: No specification for 'ExcitationLightPath' in namespace 'ndx-microscopy'
__________________________________________________________ ERROR collecting src/pynwb/tests/test_roundtrip.py __________________________________________________________
src/pynwb/tests/test_roundtrip.py:8: in <module>
    from ndx_microscopy.testing import (
src/pynwb/ndx_microscopy/__init__.py:25: in <module>
    ExcitationLightPath = get_class("ExcitationLightPath", extension_name)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/utils.py:672: in func_call
    return func(**pargs)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/pynwb/__init__.py:260: in get_class
    return __TYPE_MAP.get_dt_container_cls(neurodata_type, namespace)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/utils.py:668: in func_call
    return func(args[0], **pargs)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/build/manager.py:537: in get_dt_container_cls
    spec = self.__ns_catalog.get_spec(namespace, data_type)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/utils.py:668: in func_call
    return func(args[0], **pargs)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/spec/namespace.py:316: in get_spec
    return self.__namespaces[namespace].get_spec(data_type)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/utils.py:668: in func_call
    return func(args[0], **pargs)
../../../miniconda3/envs/test2/lib/python3.12/site-packages/hdmf/spec/namespace.py:150: in get_spec
    raise ValueError("No specification for '%s' in namespace '%s'" % (data_type, self.name))
E   ValueError: No specification for 'ExcitationLightPath' in namespace 'ndx-microscopy'

I will investigate today and get back to you.

@rly
Copy link
Contributor

rly commented Dec 18, 2024

I deleted the repo and re-cloned it, and now I get the same error. Interesting. Something must have been cached strangely.

@rly
Copy link
Contributor

rly commented Dec 18, 2024

OK I resolved the issue. ndx_ophys_devices needs to be imported before loading the namespace for ndx-microscopy because within ndx_ophys_devices/__init__.py, the ndx-ophys-devices namespace is loaded into the global type map, and that namespace needs to exist in the type map when loading ndx-microscopy into the global type map.

@alessandratrapani
Copy link
Collaborator Author

Thank you so much @rly . I will merge this PR, and continuing debugging on #22

@alessandratrapani alessandratrapani merged commit f191e47 into add_ophys_device Dec 19, 2024
2 of 8 checks passed
@alessandratrapani alessandratrapani deleted the add_ophys_device_updated_template branch December 19, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants