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

Cannot import parts of modules ('GridArray' and 'examples') #175

Open
mtrocadomoreira opened this issue Oct 19, 2023 · 2 comments
Open

Cannot import parts of modules ('GridArray' and 'examples') #175

mtrocadomoreira opened this issue Oct 19, 2023 · 2 comments

Comments

@mtrocadomoreira
Copy link

Hello!

I was trying to run the "Grids" example notebook, but I get an import error in the first cell:
ImportError: cannot import name 'GridArray' from 'nata.containers'

image

I did some tests in the interactive shell, and from nata.containers import * works fine, but it apparently doesn't import the GridArray class:

image

I noticed the same kind of error with from nata import examples, by the way.

Any idea what this could be about?
Thank you!

@fabiocruz
Copy link
Collaborator

Hi @mtrocadomoreira! I think this may be because we have decided to expose the containers differently, through

from nata import GridArray

Unfortunately, I think we forgot to update the examples...

Can you give the import above a try?

I do think now we should keep the imports from the submodules, though, e.g. from nata.containers import ....

@mtrocadomoreira
Copy link
Author

Hi @fabiocruz!

I tried your import, but I got the same error :/
ImportError: cannot import name 'GridArray' from 'nata' (/Users/Mariana/.venv/venv-nata-python3.8/lib/python3.8/site-packages/nata/__init__.py)

It's simply not importing GridArray, I don't understand why... When I try this:
import nata
dir(nata.containers)
I can see 'GridDataset' in there, but not 'GridArray', which seems very strange.

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

No branches or pull requests

2 participants