Skip to content

Replace deprecated app.add_stylesheet with app.add_css_file.#160

Merged
JulieSchramm merged 1 commit into
ufs-community:developfrom
JulieSchramm:feature/fix_rtd_build
Jul 28, 2021
Merged

Replace deprecated app.add_stylesheet with app.add_css_file.#160
JulieSchramm merged 1 commit into
ufs-community:developfrom
JulieSchramm:feature/fix_rtd_build

Conversation

@JulieSchramm
Copy link
Copy Markdown

@JulieSchramm JulieSchramm commented Jul 26, 2021

DESCRIPTION OF CHANGES:

Replace app.add_stylesheet with app.add_csss_file for ReadTheDocs build for the develop branch. This is needed to fix:
Running Sphinx v4.1.1
loading translations [en]... done
making output directory... done

Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/ufs-srweather-app/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 279, in build_main
args.tags, args.verbosity, args.jobs, args.keep_going)
File "/home/docs/checkouts/readthedocs.org/user_builds/ufs-srweather-app/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 251, in init
self.config.setup(self)
File "/home/docs/checkouts/readthedocs.org/user_builds/ufs-srweather-app/checkouts/latest/docs/UsersGuide/source/conf.py", line 113, in setup
app.add_stylesheet('custom.css') # may also be an URL
AttributeError: 'Sphinx' object has no attribute 'add_stylesheet'

Exception occurred:
File "/home/docs/checkouts/readthedocs.org/user_builds/ufs-srweather-app/checkouts/latest/docs/UsersGuide/source/conf.py", line 113, in setup
app.add_stylesheet('custom.css') # may also be an URL
AttributeError: 'Sphinx' object has no attribute 'add_stylesheet'
The full traceback has been saved in /tmp/sphinx-err-5n19bai9.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!

TESTS CONDUCTED:

HTML builds on MacOS

DEPENDENCIES:

None

DOCUMENTATION:

This fixes the documentation

@gsketefian
Copy link
Copy Markdown
Collaborator

@JulieSchramm Can you say in the PR why this change was needed? Did app.add_stylesheet change to app.add_csss_file in a recent version of ReadTheDocs? Thanks.

@JulieSchramm JulieSchramm merged commit 42c0627 into ufs-community:develop Jul 28, 2021
christinaholtNOAA added a commit to christinaholtNOAA/ufs-srweather-app that referenced this pull request Jun 7, 2022
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.

3 participants