hexrd icon indicating copy to clipboard operation
hexrd copied to clipboard

Errors building HTML documentation

Open donald-e-boyce opened this issue 1 year ago • 7 comments

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 avatar Feb 11 '25 20:02 donald-e-boyce

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

psavery avatar Feb 11 '25 21:02 psavery

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.

kpwelsh avatar Feb 13 '25 15:02 kpwelsh

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).

psavery avatar Feb 13 '25 16:02 psavery

That makes sense to me (bumping the minimum version).

Apparently I use python 3.9, but that is just because I built it so long ago using the development installation. I just haven't rebuilt in so long. There are probably others who do the same. I don't mind rebuilding, but it might also make sense to wait until the next release so that we can give formal notification to everyone.

On Thu, Feb 13, 2025 at 11:49 AM Patrick Avery @.***> wrote:

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).

— Reply to this email directly, view it on GitHub https://github.com/HEXRD/hexrd/issues/758#issuecomment-2657190268, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIWT6M3NIXKQQEV3YWUBDT2PTEHXAVCNFSM6AAAAABW6ALM6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJXGE4TAMRWHA . You are receiving this because you authored the thread.Message ID: @.***> [image: psavery]psavery left a comment (HEXRD/hexrd#758) https://github.com/HEXRD/hexrd/issues/758#issuecomment-2657190268

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).

— Reply to this email directly, view it on GitHub https://github.com/HEXRD/hexrd/issues/758#issuecomment-2657190268, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIWT6M3NIXKQQEV3YWUBDT2PTEHXAVCNFSM6AAAAABW6ALM6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJXGE4TAMRWHA . You are receiving this because you authored the thread.Message ID: @.***>

donald-e-boyce avatar Feb 13 '25 18:02 donald-e-boyce

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

psavery avatar Feb 13 '25 20:02 psavery

I am using conda. So will conda update hexrd bring everything up to date? What's the best way to get out of python 3.9?

On Thu, Feb 13, 2025 at 3:28 PM Patrick Avery @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/HEXRD/hexrd/issues/758#issuecomment-2657644009, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIWT6IH3V5WB3JC5TG2JJD2PT57HAVCNFSM6AAAAABW6ALM6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJXGY2DIMBQHE . You are receiving this because you authored the thread.Message ID: @.***> [image: psavery]psavery left a comment (HEXRD/hexrd#758) https://github.com/HEXRD/hexrd/issues/758#issuecomment-2657644009

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

— Reply to this email directly, view it on GitHub https://github.com/HEXRD/hexrd/issues/758#issuecomment-2657644009, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIWT6IH3V5WB3JC5TG2JJD2PT57HAVCNFSM6AAAAABW6ALM6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJXGY2DIMBQHE . You are receiving this because you authored the thread.Message ID: @.***>

donald-e-boyce avatar Feb 13 '25 20:02 donald-e-boyce

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).

psavery avatar Feb 13 '25 20:02 psavery