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

Errors building HTML documentation #758

Open
donald-e-boyce opened this issue Feb 11, 2025 · 7 comments
Open

Errors building HTML documentation #758

donald-e-boyce opened this issue Feb 11, 2025 · 7 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@donald-e-boyce
Copy link
Collaborator

I ran into these errors running make html in the docs directory under hexrd.

(hexrd-dev) (MBP-2023: docs) 1166. make html
Running Sphinx v7.3.7
/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinxcontrib/applehelp/__init__.py:24: RemovedInSphinx80Warning: The alias 'sphinx.util.SkipProgressMessage' is deprecated, use 'sphinx.util.display.SkipProgressMessage' instead. Check CHANGES for Sphinx API modifications.
  from sphinx.util import SkipProgressMessage, progress_message
/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinxcontrib/applehelp/__init__.py:24: RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.util.display.progress_message' instead. Check CHANGES for Sphinx API modifications.
  from sphinx.util import SkipProgressMessage, progress_message
/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinxcontrib/htmlhelp/__init__.py:26: RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.util.display.progress_message' instead. Check CHANGES for Sphinx API modifications.
  from sphinx.util import progress_message
loading pickled environment... done
myst v3.0.1: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=set(), disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 12 changed, 0 removed
reading sources... [100%] hexrd.wppf.RietveldHEDM
WARNING: autodoc: failed to import module 'copyright' from module 'hexrd'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinx/ext/autodoc/importer.py", line 143, in import_module
    return importlib.import_module(modname)
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/copyright.py", line 38, in <module>
    with open(os.path.join(os.path.dirname(__file__), COPYRIGHT_FILE), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/deboyce/Source/hexrd/pkg/hexrd/COPYING'

WARNING: autodoc: failed to import module 'calibration' from module 'hexrd.fitting'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinx/ext/autodoc/importer.py", line 143, in import_module
    return importlib.import_module(modname)
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/__init__.py", line 1, in <module>
    from .instrument import InstrumentCalibrator
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/instrument.py", line 7, in <module>
    from .lmfit_param_handling import (
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/lmfit_param_handling.py", line 323, in <module>
    euler_convention: dict | tuple) -> np.ndarray:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

WARNING: autodoc: failed to import module 'calibration.calibrator' from module 'hexrd.fitting'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinx/ext/autodoc/importer.py", line 143, in import_module
    return importlib.import_module(modname)
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/__init__.py", line 1, in <module>
    from .instrument import InstrumentCalibrator
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/instrument.py", line 7, in <module>
    from .lmfit_param_handling import (
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/lmfit_param_handling.py", line 323, in <module>
    euler_convention: dict | tuple) -> np.ndarray:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

WARNING: autodoc: failed to import module 'calibration.instrument' from module 'hexrd.fitting'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinx/ext/autodoc/importer.py", line 143, in import_module
    return importlib.import_module(modname)
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/__init__.py", line 1, in <module>
    from .instrument import InstrumentCalibrator
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/instrument.py", line 7, in <module>
    from .lmfit_param_handling import (
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/lmfit_param_handling.py", line 323, in <module>
    euler_convention: dict | tuple) -> np.ndarray:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

WARNING: autodoc: failed to import module 'calibration.laue' from module 'hexrd.fitting'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinx/ext/autodoc/importer.py", line 143, in import_module
    return importlib.import_module(modname)
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/__init__.py", line 1, in <module>
    from .instrument import InstrumentCalibrator
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/instrument.py", line 7, in <module>
    from .lmfit_param_handling import (
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/lmfit_param_handling.py", line 323, in <module>
    euler_convention: dict | tuple) -> np.ndarray:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

WARNING: autodoc: failed to import module 'calibration.lmfit_param_handling' from module 'hexrd.fitting'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinx/ext/autodoc/importer.py", line 143, in import_module
    return importlib.import_module(modname)
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/__init__.py", line 1, in <module>
    from .instrument import InstrumentCalibrator
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/instrument.py", line 7, in <module>
    from .lmfit_param_handling import (
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/lmfit_param_handling.py", line 323, in <module>
    euler_convention: dict | tuple) -> np.ndarray:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

WARNING: autodoc: failed to import module 'calibration.multigrain' from module 'hexrd.fitting'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinx/ext/autodoc/importer.py", line 143, in import_module
    return importlib.import_module(modname)
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/__init__.py", line 1, in <module>
    from .instrument import InstrumentCalibrator
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/instrument.py", line 7, in <module>
    from .lmfit_param_handling import (
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/lmfit_param_handling.py", line 323, in <module>
    euler_convention: dict | tuple) -> np.ndarray:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

WARNING: autodoc: failed to import module 'calibration.powder' from module 'hexrd.fitting'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinx/ext/autodoc/importer.py", line 143, in import_module
    return importlib.import_module(modname)
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/__init__.py", line 1, in <module>
    from .instrument import InstrumentCalibrator
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/instrument.py", line 7, in <module>
    from .lmfit_param_handling import (
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/lmfit_param_handling.py", line 323, in <module>
    euler_convention: dict | tuple) -> np.ndarray:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

WARNING: autodoc: failed to import module 'calibration.structureless' from module 'hexrd.fitting'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinx/ext/autodoc/importer.py", line 143, in import_module
    return importlib.import_module(modname)
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/__init__.py", line 1, in <module>
    from .instrument import InstrumentCalibrator
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/instrument.py", line 7, in <module>
    from .lmfit_param_handling import (
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/fitting/calibration/lmfit_param_handling.py", line 323, in <module>
    euler_convention: dict | tuple) -> np.ndarray:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

WARNING: autodoc: failed to import module 'eiger_stream_v1' from module 'hexrd.imageseries.load'; the following exception was raised:
No module named 'dectris'
WARNING: autodoc: failed to import module 'spherical' from module 'hexrd.projections'; the following exception was raised:
No module named 'hexrd.xrdutils'
WARNING: autodoc: failed to import module 'RietveldHEDM' from module 'hexrd.wppf'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/site-packages/sphinx/ext/autodoc/importer.py", line 143, in import_module
    return importlib.import_module(modname)
  File "/Users/deboyce/miniconda3/envs/hexrd-dev/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 846, in exec_module
  File "<frozen importlib._bootstrap_external>", line 983, in get_code
  File "<frozen importlib._bootstrap_external>", line 913, in source_to_code
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/deboyce/Source/hexrd/pkg/hexrd/wppf/RietveldHEDM.py", line 114
    """
    ^
IndentationError: expected an indented block

looking for now-outdated files... none found
pickling environment... done
checking consistency... /Users/deboyce/Source/hexrd/pkg/docs/source/users/GrainData.rst: WARNING: document isn't included in any toctree
done
preparing documents... done
                  copying downloadable files... [100%] _static/transforms.pdf
copying static files... done
copying extra files... done
done
writing output... [100%] index
generating indices... genindex py-modindex done
highlighting module code... [ 31%] hexrd.fitting.calibration.relative_constraintWARNING:root:mpi4py failed to load on hostname='MacBook-Pro-2023.local'. MPI is disabled.
highlighting module code... [100%] hexrd.xrdutil.utils
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 13 warnings.

The HTML pages are in build/html.
@donald-e-boyce donald-e-boyce added bug Something isn't working documentation Improvements or additions to documentation labels Feb 11, 2025
@psavery
Copy link
Collaborator

psavery commented Feb 11, 2025

Well, at least it succeeded 🙂. But we should clean up these warnings.

@kpwelsh
Copy link
Collaborator

kpwelsh commented Feb 13, 2025

It looks like its just due to python versioning and RietveldHEDM not actually parsing.

HEXRD says it requires Python 3.9+, but | for types was introduced in 3.10. So I think technically some of those warnings are issues -- the code wouldn't run if someone tried to import lmfit_param_handling on 3.9.

@psavery
Copy link
Collaborator

psavery commented Feb 13, 2025

I wonder if we should just go ahead and bump the minimum version of Python required to 3.10. We strongly suggest for people to use Python3.11 anyways, due to a number of performance improvements in Python. I don't know of anyone who actually needs us to continue supporting Python 3.9 (which has its end of life coming up in 8 months).

@donald-e-boyce
Copy link
Collaborator Author

donald-e-boyce commented Feb 13, 2025 via email

@psavery
Copy link
Collaborator

psavery commented Feb 13, 2025

Most people I know who use it are using conda, in which it's easy to change/upgrade Python versions.

@donald-e-boyce
Copy link
Collaborator Author

donald-e-boyce commented Feb 13, 2025 via email

@psavery
Copy link
Collaborator

psavery commented Feb 13, 2025

I'd create a new conda environment like so:

conda create -n hexrd-latest -c hexrd -c conda-forge python=3.11 hexrd
conda activate hexrd-latest

That's just for the hexrd library.

You can potentially update everything in the current conda environment by installing a new python version like conda install -c conda-forge python=3.11. However, you probably need to reinstall many dependencies anyways (since the dependencies may be built for specific versions of Python).

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

No branches or pull requests

3 participants