Problem with __version__ when running on LHO opslogin0
Crash occurs when running on opslogin0 using ndscope-test.
Traceback (most recent call last):
File "/usr/local/lib/ndscope/ndscope/__init__.py", line 2, in <module>
from .__version__ import version as __version__
ModuleNotFoundError: No module named 'ndscope.__version__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/ndscope/ndscope/__init__.py", line 6, in <module>
__version__ = setuptools_scm.get_version(fallback_version='?.?.?')
TypeError: get_version() got an unexpected keyword argument 'fallback_version'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.7/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/local/lib/ndscope/ndscope/__init__.py", line 10, in <module>
__version__ = setuptools_scm.get_version()
File "/usr/lib/python3/dist-packages/setuptools_scm/__init__.py", line 144, in get_version
parsed_version = _do_parse(config)
File "/usr/lib/python3/dist-packages/setuptools_scm/__init__.py", line 111, in _do_parse
"use git+https://github.com/user/proj.git#egg=proj" % config.absolute_root
LookupError: setuptools-scm was unable to detect version for '/ligo/home/erik.vonreis'.
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
The crash can be avoided by adding a version.py file that defines a variable version with the version string.
I can't recreate this problem elsewhere, so it may just be something wrong with the setup.