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

Fix storage RTD for newer sphinx #591

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Fix storage RTD for newer sphinx #591

merged 1 commit into from
Sep 20, 2024

Conversation

rly
Copy link
Contributor

@rly rly commented Sep 20, 2024

Now that we have the storage readthedocs page running again, this error appeared:

python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html
Running Sphinx v7.4.7
/home/docs/checkouts/readthedocs.org/user_builds/nwb-storage/checkouts/latest/docs/storage/source/conf.py:195: SyntaxWarning: invalid escape sequence '\s'
  'preamble': '\setcounter{secnumdepth}{6}',
loading translations [en]... done
making output directory... done

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/nwb-storage/envs/latest/lib/python3.12/site-packages/sphinx/cmd/build.py", line 332, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/nwb-storage/envs/latest/lib/python3.12/site-packages/sphinx/application.py", line 267, in __init__
    self.config.setup(self)
  File "/home/docs/checkouts/readthedocs.org/user_builds/nwb-storage/checkouts/latest/docs/storage/source/conf.py", line 108, in setup
    app.add_stylesheet("theme_overrides.css")  # overrides for wide tables in RTD theme
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'Sphinx' object has no attribute 'add_stylesheet'

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/nwb-storage/checkouts/latest/docs/storage/source/conf.py", line 108, in setup
    app.add_stylesheet("theme_overrides.css")  # overrides for wide tables in RTD theme
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'Sphinx' object has no attribute 'add_stylesheet'
The full traceback has been saved in /tmp/sphinx-err-mvlolqi9.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

add_stylesheet was deprecated in a recent version of sphinx. add_css_file should be used instead.

@rly rly enabled auto-merge (squash) September 20, 2024 00:15
@rly rly merged commit f11b765 into dev Sep 20, 2024
4 of 5 checks passed
@rly rly deleted the rly-patch-1 branch September 20, 2024 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants