spack / spack

A flexible package manager that supports multiple versions, configurations, platforms, and compilers.
https://spack.io
Other
4.26k stars 2.26k forks source link

Docs won't build locally, spack.ci import error #23535

Closed adamjstewart closed 1 year ago

adamjstewart commented 3 years ago

Tried building the docs locally for the first time in a long time and ran into an error.

Steps to reproduce the issue

$ cd lib/spack/docs
$ make html

Error Message

Warning, treated as error:
autodoc: failed to import module 'ci' from module 'spack'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/Adam/.spack/.spack-env/view/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py", line 66, in import_module
    return importlib.import_module(modname)
  File "/Users/Adam/.spack/.spack-env/view/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/Adam/spack/lib/spack/spack/ci.py", line 48, in <module>
    spack_compiler = spack.main.SpackCommand('compiler')
  File "/Users/Adam/spack/lib/spack/spack/main.py", line 522, in __init__
    self.command = self.parser.add_command(command_name)
  File "/Users/Adam/spack/lib/spack/spack/main.py", line 321, in add_command
    module.setup_parser(subparser)
  File "/Users/Adam/spack/lib/spack/spack/cmd/compiler.py", line 30, in setup_parser
    scopes = spack.config.scopes()
  File "/Users/Adam/spack/lib/spack/spack/config.py", line 911, in scopes
    return config.scopes
  File "/Users/Adam/spack/lib/spack/llnl/util/lang.py", line 762, in __getattr__
    return getattr(self.instance, name)
  File "/Users/Adam/spack/lib/spack/llnl/util/lang.py", line 761, in __getattr__
    raise AttributeError()
AttributeError

make: *** [html] Error 2

Information on your system

Additional information

git blame says @scottwittenburg @opadron @scheibelp may have some idea.

adamjstewart commented 3 years ago

Encountered this again today on another system:

alalazo commented 1 year ago

Work for me on: