AllenInstitute / AllenSDK

code for reading and processing Allen Institute for Brain Science data
https://allensdk.readthedocs.io/en/latest/
Other
340 stars 150 forks source link

ImportError: cannot import name 'popargs_to_dict' #2542

Closed ZhenyaoYe closed 1 year ago

ZhenyaoYe commented 1 year ago

Hi Allen Institute,

After importing allensdk, I got an import error (ImportError: cannot import name 'popargs_to_dict') when I used: from allensdk.api.queries.rma_api import RmaApi from allensdk.api.warehouse_cache.cache import cache

Any suggestions are appreciated!

Best regards, Zhenyao

rly commented 1 year ago

@ZhenyaoYe I think this is due to a version mismatch between pynwb and hdmf, which are used by allensdk. I maintain pynwb and hdmf. What versions of pynwb and hdmf do you have installed? Please run pip list and pip check and report back the output. Thanks!

ZhenyaoYe commented 1 year ago

Hi Ryan Ly,

Thank you so much for your response!

Here is the output for the version of pynwb and hdmf by using pip list: [image: image.png] [image: image.png]

Here is the output by using pip check: [image: image.png]

Any suggestions are appreciated!

Best regards, Zhenyao

On Wed, Sep 21, 2022 at 2:28 AM Ryan Ly @.***> wrote:

@ZhenyaoYe https://github.com/ZhenyaoYe I think this is due to a version mismatch between pynwb and hdmf, which are used by allensdk. I maintain pynwb and hdmf. What versions of pynwb and hdmf do you have installed? Please run pip list and pip check and report back the output. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/AllenInstitute/AllenSDK/issues/2542#issuecomment-1253262566, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHF4AJJQCBK6IIF2F22CY3V7KTI3ANCNFSM6AAAAAAQRV5D2A . You are receiving this because you were mentioned.Message ID: @.***>

rly commented 1 year ago

Hi @ZhenyaoYe unfortunately I cannot see the images. Can you use check the images? You might have to use the github website to upload the images.

ZhenyaoYe commented 1 year ago

Hi Ryan Ly, Sorry, I didn't notice this issue.

Here is the output for the version of pynwb and hdmf by using pip list: hdmf_version pynwb_version

Here is the output by using pip check: pipcheck

Please feel free to let me know if you have any problems seeing the above images. Thank you so much!

Best regards, Zhenyao

rly commented 1 year ago

Thanks @ZhenyaoYe

Please run pip install -U hdmf. The pip check output shows an incompatibility between the pynwb and hdmf versions. I am not sure how that came to be but the above command should fix it.

ZhenyaoYe commented 1 year ago

Hi Ryan,

I used pip install -U hdmf and got log output, which indicates that version of hdmf is already up-to-date, 3.0.1. image

I tried using pip install hdmf--3.4.5, but I got an error, which potint out the highest available vesion of hdmf is 3.0.1. image

Do you have any ideas about it? Thank you!

Best regards, Zhenyao

rly commented 1 year ago

@ZhenyaoYe Are you by any chance using a local pypi mirror, and that mirror has not been updated with the latest packages from pypi.org? The version of hdmf after 3.0.1 (3.1.0) was released on July 21, 2021.

ZhenyaoYe commented 1 year ago

Hi Ryan, Thank you so much for your suggestion! Finally, I successfully updated the version of hdmf. Thanks again!

Best regards, Zhenyao

rly commented 1 year ago

I'm glad you were able to resolve the issue!