ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
121 stars 77 forks source link

RTD has error #1062

Closed pllim closed 1 year ago

pllim commented 1 year ago

Whatever you just pushed to main branch broke RTD. FYI.

https://readthedocs.org/projects/ginga/builds/21551221/

pllim commented 1 year ago

Or maybe dependencies have changed since last week when it last built successfully. Your latest commit seems unrelated to this error.

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx/builders/html/__init__.py", line 1098, in handle_page
    output = self.templates.render(templatename, ctx)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/readthedocs_ext/readthedocs.py", line 181, in rtd_render
    content = old_render(template, render_context)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx/jinja2glue.py", line 196, in render
    return self.environment.get_template(template).render(context)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/jinja2/environment.py", line 1291, in render
    self.environment.handle_exception()
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/jinja2/environment.py", line 925, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx/themes/basic/page.html", line 10, in top-level template code
    {%- extends "layout.html" %}
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx_rtd_theme/layout.html", line 67, in top-level template code
    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
jinja2.exceptions.UndefinedError: 'style' is undefined

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx/cmd/build.py", line 290, in build_main
    app.build(args.force_all, args.filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx/application.py", line 351, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 290, in build_update
    self.build(to_build,
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 360, in build
    self.write(docnames, list(updated_docnames), method)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 567, in write
    self._write_serial(sorted(docnames))
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 577, in _write_serial
    self.write_doc(docname, doctree)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx/builders/html/__init__.py", line 675, in write_doc
    self.handle_page(docname, ctx, event_arg=doctree)
  File "/home/docs/checkouts/readthedocs.org/user_builds/ginga/envs/latest/lib/python3.9/site-packages/sphinx/builders/html/__init__.py", line 1105, in handle_page
    raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") %
sphinx.errors.ThemeError: An error happened in rendering the page FAQ.
Reason: UndefinedError("'style' is undefined")

Theme error:
An error happened in rendering the page FAQ.
Reason: UndefinedError("'style' is undefined")
pllim commented 1 year ago

Apparently fixed in https://github.com/readthedocs/sphinx_rtd_theme/pull/1464 , so need to figure why it is popping up, but I don't have time this week.

For now, maybe you can try https://github.com/readthedocs/readthedocs.org/issues/10279 ?

ejeschke commented 1 year ago

Whatever you just pushed to main branch broke RTD.

Hmm, was a pretty minor code fix for the GridBox widget with no change to documentation. Wondering if this is related to #1060...

ejeschke commented 1 year ago

Looks like we will need to pin sphinx<7