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

__version__ doesn't work #111

Closed
TomNicholas opened this issue Jun 16, 2022 · 4 comments · Fixed by #113
Closed

__version__ doesn't work #111

TomNicholas opened this issue Jun 16, 2022 · 4 comments · Fixed by #113
Labels
bug Something isn't working packaging

Comments

@TomNicholas
Copy link
Collaborator

Currently trying to get the version of datatree interactively raises an AttributeError:

import datatree

datatree.__version__
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 datatree.__version__

AttributeError: module 'datatree' has no attribute '__version__'

That's weird because we do have code to set the version number in __init__.py.

@TomNicholas TomNicholas added the bug Something isn't working label Jun 16, 2022
@djhoese
Copy link

djhoese commented Jun 16, 2022

You have to reinstall the package usually.

@djhoese
Copy link

djhoese commented Jun 16, 2022

To clarify, setuptools-scm and versioneer only set the version number on installation. This is likely your issue.

@TomNicholas
Copy link
Collaborator Author

Thanks @djhoese. I just tried reinstalling locally (pip install -e .) and that didn't work though 😕

@djhoese
Copy link

djhoese commented Jun 16, 2022

Did you restart your jupyter kernel or whatever you are using? The error says "cell line" so I assume jupyter, spyder, or similar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working packaging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants