-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Build broken due to TypeError: 'generator' object is not subscriptable #9788
Comments
Similar to #9727, pin |
See also readthedocs/readthedocs.org#8616. |
Sphinx build was failing because of this issue sphinx-doc/sphinx#9788 Pinning docutils seems easier than upgrading Sphinx from 1.8 to > 4.0 In the future you might want to look into upgrading Sphinx
The |
Just noticed this started 2 or 3 days ago for me on RTD:
Good: Bad: i.e. Updated from docutils-0.17.1 (working) to docutils-0.18 (broken) |
@m4sterbunny You didn't move your @peterjc Yes, this is caused by docutils 0.18, see the linked issues in my comments above. |
But the RtD build fails with a new error (whereas local build completes): Sphinx error: |
@m4sterbunny The I see that the |
Also, notice that Sphinx and Read the Docs have separate issue trackers. The former is this one, the latter is https://github.com/readthedocs/readthedocs.org/issues/. If your problem is with Sphinx it should be here, if it's with Read the Docs it should be there. |
Closes #1054 Related to sphinx-doc/sphinx#9788 Related to readthedocs/readthedocs.org#8616
docutils 0.18 is busted and needs to be prevented from being installed Related to sphinx-doc/sphinx#9788 Related to readthedocs/readthedocs.org#8616
This is the workaround for sphinx-doc/sphinx#9788 Also update the intersphinx link for NumPy. NumPy moved away from docs.scipy.org quite a while ago. Pointing to numpy.org/devdocs matches what SciPy does.
Docs were not building on read the docs, see also: sphinx-doc/sphinx#9788
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
https://readthedocs.org/projects/demo-zoom
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?
The text was updated successfully, but these errors were encountered: