Skip to content

Commit 5c11ab1

Browse files
committed
BUG: app.builder can be None
To address: ``` Running Sphinx v5.0.2 making output directory... done Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/itkwidgets/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 275, in build_main args.tags, args.verbosity, args.jobs, args.keep_going) File "/home/docs/checkouts/readthedocs.org/user_builds/itkwidgets/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 237, in __init__ self.config.setup(self) File "/home/docs/checkouts/readthedocs.org/user_builds/itkwidgets/checkouts/latest/docs/conf.py", line 79, in setup if RTD and app.builder.format == "html": AttributeError: 'NoneType' object has no attribute 'format' ```
1 parent 661bbf1 commit 5c11ab1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@
7070
'_output']
7171

7272
def jupyterlite_build(app: Sphinx, error):
73+
if error is not None and app.builder and app.builder.format == "html":
7374
subprocess.check_call(['jupyter', 'lite', 'build', '--config',
7475
str(jupyterlite_config)], cwd=str(here))
7576

7677
def setup(app):
7778
# For local builds, run jupyter lite build manually
7879
# $ jupyter lite serve --config ./jupyterlite_config.json
79-
if RTD and app.builder.format == "html":
80+
if RTD:
8081
app.connect("config-inited", jupyterlite_build)

0 commit comments

Comments
 (0)