ProjectPythia / HRRR-AWS-cookbook

A cookbook for working with AWS-served HRRR model output data
https://projectpythia.org/HRRR-AWS-cookbook/
Apache License 2.0
5 stars 5 forks source link

Build is failing with out-of-date Sphinx version #36

Closed brian-rose closed 1 week ago

brian-rose commented 2 weeks ago

Nightly builds of this cookbook have been failing for the past few days.

For some reason we are getting an out-of-date version of Sphinx (v5.3.0) in the build environment. This is from the most recent build

Running Sphinx v5.3.0

Extension error:
Could not import extension sphinx.builders.epub3 (exception: No module named 'imghdr')
Traceback (most recent call last):
  File "/home/runner/miniconda3/envs/HRRR-AWS-cookbook-dev/lib/python3.13/site-packages/sphinx/registry.py", line 459, in load_extension
    mod = import_module(extname)
  File "/home/runner/miniconda3/envs/HRRR-AWS-cookbook-dev/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1022, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/runner/miniconda3/envs/HRRR-AWS-cookbook-dev/lib/python3.13/site-packages/sphinx/builders/epub3.py", line 12, in <module>
    from sphinx.builders import _epub_base
  File "/home/runner/miniconda3/envs/HRRR-AWS-cookbook-dev/lib/python3.13/site-packages/sphinx/builders/_epub_base.py", line 16, in <module>
    from sphinx.builders.html import BuildInfo, StandaloneHTMLBuilder
  File "/home/runner/miniconda3/envs/HRRR-AWS-cookbook-dev/lib/python3.13/site-packages/sphinx/builders/html/__init__.py", line 46, in <module>
    from sphinx.writers.html import HTMLTranslator, HTMLWriter
  File "/home/runner/miniconda3/envs/HRRR-AWS-cookbook-dev/lib/python3.13/site-packages/sphinx/writers/html.py", line 21, in <module>
    from sphinx.util.images import get_image_size
  File "/home/runner/miniconda3/envs/HRRR-AWS-cookbook-dev/lib/python3.13/site-packages/sphinx/util/images.py", line 4, in <module>
    import imghdr
ModuleNotFoundError: No module named 'imghdr'

The most recent successful build installed Sphinx v7.4.7.

I couldn't reproduce the failure locally. I created a new build environment on a Mac M1 laptop and got Sphinx v7.3.7. The build ran without error.

ktyle commented 2 weeks ago

hmmm wonder if it might be related to Python 3.13. I'll try doing a version pin to 3.12 as a first step to rule that out.

ktyle commented 1 week ago

AFAIK the problem stems from the current (1.0.3) version of jupyter-book. With Python >=3.13, it seems to require sphinx=5.3.0.