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

Error with Versioning without setuptools-scm installed #386

Closed
MicahGale opened this issue Mar 9, 2024 · 1 comment · Fixed by #387
Closed

Error with Versioning without setuptools-scm installed #386

MicahGale opened this issue Mar 9, 2024 · 1 comment · Fixed by #387
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". CI/CD critical An issue that seriously limits user adoption or hampers current use.

Comments

@MicahGale
Copy link
Collaborator

Describe the bug

After pulling the latest develop version and trying to import montepy I got the following error:

Traceback (most recent call last):
  File "/home/mgale/dev/montepy/montepy/__init__.py", line 28, in <module>
    from . import _version
ImportError: cannot import name '_version' from partially initialized module 'montepy' (most likely due to a circular import) (/home/mgale/dev/montepy/montepy/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mgale/miniforge3/lib/python3.10/site-packages/sphinx/config.py", line 358, in eval_config_file
    exec(code, namespace)  # NoQA: S102
  File "/home/mgale/dev/montepy/doc/source/conf.py", line 18, in <module>
    import montepy
  File "/home/mgale/dev/montepy/montepy/__init__.py", line 35, in <module>
    __version__ = get_version()
  File "/home/mgale/miniforge3/lib/python3.10/site-packages/setuptools_scm/_get_version_impl.py", line 158, in get_version
    _version_missing(config)
  File "/home/mgale/miniforge3/lib/python3.10/site-packages/setuptools_scm/_get_version_impl.py", line 112, in _version_missing
    raise LookupError(
LookupError: setuptools-scm was unable to detect version for /home/mgale/dev/montepy/doc/source.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

make: *** [Makefile:20: html] Error 2

To Reproduce

In a fresh python environment run:

git clone ...
cd doc
make html

Version

3f92bb2

Additional context

Add any other context about the problem here.

@MicahGale MicahGale added bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". CI/CD critical An issue that seriously limits user adoption or hampers current use. labels Mar 9, 2024
@MicahGale
Copy link
Collaborator Author

setuptools-scm is installed.

@MicahGale MicahGale linked a pull request Mar 9, 2024 that will close this issue
3 tasks
MicahGale added a commit that referenced this issue Mar 9, 2024
MicahGale added a commit that referenced this issue Mar 9, 2024
This reverts commit d92dd64.
*This was done to avoid redundant documentation builds.
@MicahGale MicahGale mentioned this issue Mar 9, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". CI/CD critical An issue that seriously limits user adoption or hampers current use.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant