Repository navigation
Description
Describe the bug
This built fine locally for me.
When I tried to force a build from your interface this Exception occurred:
File "/home/docs/checkouts/readthedocs.org/user_builds/demo-zoom/envs/latest/lib/python3.7/site-packages/sphinx/builders/latex/init.py", line 201, in write
if toctrees[0].get('maxdepth') > 0:
TypeError: 'generator' object is not subscriptable
How to Reproduce
git clone --no-single-branch --depth 50 https://github.com/m4sterbunny/Demo.git .
git checkout --force origin/master
git clean -d -f -f
python3.7 -mvirtualenv /home/docs/checkouts/readthedocs.org/user_builds/demo-zoom/envs/latest
/home/docs/checkouts/readthedocs.org/user_builds/demo-zoom/envs/latest/bin/python -m pip install --upgrade --no-cache-dir pip setuptools
/home/docs/checkouts/readthedocs.org/user_builds/demo-zoom/envs/latest/bin/python -m pip install --upgrade --no-cache-dir mock==1.0.1 pillow==5.4.1 alabaster>=0.7,<0.8,!=0.7.5 commonmark==0.8.1 recommonmark==0.5.0 sphinx<2 sphinx-rtd-theme<0.5 readthedocs-sphinx-ext<2.2
cat source/conf.py
/home/docs/checkouts/readthedocs.org/user_builds/demo-zoom/envs/latest/bin/python -m sphinx -T -b html -d _build/doctrees -D language=en . _build/html
/home/docs/checkouts/readthedocs.org/user_builds/demo-zoom/envs/latest/bin/python -m sphinx -T -b readthedocssinglehtmllocalmedia -d _build/doctrees -D language=en . _build/localmedia
/home/docs/checkouts/readthedocs.org/user_builds/demo-zoom/envs/latest/bin/python -m sphinx -b latex -D language=en -d _build/doctrees . _build/latex
Running Sphinx v1.8.5
loading translations [en]... done
making output directory...
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
processing Showcasing.tex...
Exception occurred:
File "/home/docs/checkouts/readthedocs.org/user_builds/demo-zoom/envs/latest/lib/python3.7/site-packages/sphinx/builders/latex/init.py", line 201, in write
if toctrees[0].get('maxdepth') > 0:
TypeError: 'generator' object is not subscriptable
The full traceback has been saved in /tmp/sphinx-err-omlwgho4.log,
Expected behavior
This built fine locally. I expected you to build it too!
Outputs here: https://demo-zoom.readthedocs.io/en/latest/pages/
Your project
Screenshots
No response
OS
Win 10 with Ubuntu
Python version
Python 3
Sphinx version
How do I even get that Sphinx -v does not work, nor variants of
Sphinx extensions
No response
Extra tools
No response
Additional context
Works for me locally. What's up?
Activity
astrojuanlu commentedon Oct 28, 2021
Similar to #9727, pin
docutils<0.18in your requirements.astrojuanlu commentedon Oct 28, 2021
See also readthedocs/readthedocs.org#8616.
m4sterbunny commentedon Oct 28, 2021
Tried to follow the docs, but despite specifying which Sphinx -- locally and remotely I seem to be on 1.8.5:

fix documentation build: pin docutils to 0.17
astrojuanlu commentedon Oct 28, 2021
The
.readthedocs.yamlfile should be at the root of the repository, please try moving itpeterjc commentedon Oct 28, 2021
Just noticed this started 2 or 3 days ago for me on RTD:
https://readthedocs.org/projects/thapbi-pict/builds/
Good:
Jinja2-3.0.2 MarkupSafe-2.0.1 Pygments-2.10.0 alabaster-0.7.12 babel-2.9.1 certifi-2021.10.8 charset-normalizer-2.0.7 commonmark-0.8.1 docutils-0.17.1 future-0.18.2 idna-3.3 imagesize-1.2.0 mock-1.0.1 packaging-21.0 pillow-5.4.1 pyparsing-3.0.1 pytz-2021.3 readthedocs-sphinx-ext-2.1.4 recommonmark-0.5.0 requests-2.26.0 six-1.16.0 snowballstemmer-2.1.0 sphinx-1.8.5 sphinx-rtd-theme-0.4.3 sphinxcontrib-serializinghtml-1.1.5 sphinxcontrib-websupport-1.2.4 urllib3-1.26.7
Bad:
Jinja2-3.0.2 MarkupSafe-2.0.1 Pygments-2.10.0 alabaster-0.7.12 babel-2.9.1 certifi-2021.10.8 charset-normalizer-2.0.7 commonmark-0.8.1 docutils-0.18 future-0.18.2 idna-3.3 imagesize-1.2.0 mock-1.0.1 packaging-21.0 pillow-5.4.1 pyparsing-3.0.3 pytz-2021.3 readthedocs-sphinx-ext-2.1.4 recommonmark-0.5.0 requests-2.26.0 six-1.16.0 snowballstemmer-2.1.0 sphinx-1.8.5 sphinx-rtd-theme-0.4.3 sphinxcontrib-serializinghtml-1.1.5 sphinxcontrib-websupport-1.2.4 urllib3-1.26.7
i.e. Updated from docutils-0.17.1 (working) to docutils-0.18 (broken)
m4sterbunny commentedon Oct 29, 2021
I had tried that in my wanderings in the wilderness; but to no effect:
astrojuanlu commentedon Oct 29, 2021
@m4sterbunny You didn't move your
.readthedocs.yamlfile yet, or at least I don't see it in your demo project. If you do, please link to the corresponding build or commit.@peterjc Yes, this is caused by docutils 0.18, see the linked issues in my comments above.
m4sterbunny commentedon Oct 29, 2021
OK -- so I pushed rather than just looking local. Interestingly I am now getting different Sphinx version locally compared to your Build:

m4sterbunny commentedon Oct 29, 2021
But the RtD build fails with a new error (whereas local build completes):
[https://readthedocs.org/projects/demo-zoom/builds/15124864/]
Sphinx error:
master file /home/docs/checkouts/readthedocs.org/user_builds/demo-zoom/checkouts/latest/index.rst not found
pin down docutils
pin down docutils (#739)
pin down docutils (#739)
astrojuanlu commentedon Oct 29, 2021
@m4sterbunny The
.readthedocs.yamlfile is only used by Read the Docs, it has no effect locally.I see that the
generatorproblem was solved after moving the config file to the root of the repository. Please open another issue with the current problem.1 remaining item
Update requirements.txt
Fix up ReadTheDocs publishing
Fix docutils version for Sphinx docs build
Fix docutils version for Sphinx docs build
Fix ReadTheDocs builds
MAINT: fix doc build by pinning docutils.
Fix ReadTheDocs builds - prevent docutils 0.18 from being used
FIX: Pin docutils dependency for sphinx compilation
update requirements to try to fix Sphinx issue
Try to fix docs dependencies