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

generation raised StopIteration #6722

Closed
baylessj opened this issue Oct 8, 2019 · 2 comments
Closed

generation raised StopIteration #6722

baylessj opened this issue Oct 8, 2019 · 2 comments

Comments

@baylessj
Copy link
Contributor

baylessj commented Oct 8, 2019

Describe the bug
sphinx-build exits with a raised exception under normal conditions.

Seems related to #5870 and #5076.

To Reproduce
Run sphinx-build on the project linked below.

Expected behavior
project builds successfully.

Your project
pros-docs

Environment info

  • OS: Pop!_OS 19.04
  • Python version: 3.7.3
  • Sphinx version: 2.2.0
  • Sphinx extensions: ['tabs', 'ablog', 'sphinx_click.ext']

Additional context
Log file:

# Sphinx version: 2.2.0
# Python version: 3.7.3 (CPython)
# Docutils version: 0.15.2 release
# Jinja2 version: 2.10.3
# Last messages:
#   writing output... [ 96%] tutorials/topical/multitasking
#   writing output... [ 97%] tutorials/topical/notifications
#   writing output... [ 98%] tutorials/topical/vision
#   writing output... [ 98%] tutorials/topical/wireless-upload
#   writing output... [ 99%] tutorials/walkthrough/clawbot
#   writing output... [100%] tutorials/walkthrough/creating-c-project
#   
#   generating indices...
#   genindex
#   done
# Loaded extensions:
#   sphinx.ext.mathjax (2.2.0) from /home/bayle/.local/lib/python3.7/site-packages/sphinx/ext/mathjax.py
#   sphinxcontrib.applehelp (1.0.1) from /home/bayle/.local/lib/python3.7/site-packages/sphinxcontrib/applehelp/__init__.py
#   sphinxcontrib.devhelp (1.0.1) from /home/bayle/.local/lib/python3.7/site-packages/sphinxcontrib/devhelp/__init__.py
#   sphinxcontrib.htmlhelp (1.0.2) from /home/bayle/.local/lib/python3.7/site-packages/sphinxcontrib/htmlhelp/__init__.py
#   sphinxcontrib.serializinghtml (1.1.3) from /home/bayle/.local/lib/python3.7/site-packages/sphinxcontrib/serializinghtml/__init__.py
#   sphinxcontrib.qthelp (1.0.2) from /home/bayle/.local/lib/python3.7/site-packages/sphinxcontrib/qthelp/__init__.py
#   alabaster (0.7.12) from /home/bayle/.local/lib/python3.7/site-packages/alabaster/__init__.py
#   tabs (unknown version) from /home/bayle/Documents/git/pros-docs/sphinx-tabs/sphinx_tabs/tabs.py
#   ablog (0.9.4) from /usr/local/lib/python3.7/dist-packages/ablog/__init__.py
#   sphinx_click.ext (unknown version) from /home/bayle/.local/lib/python3.7/site-packages/sphinx_click/ext.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/ablog/post.py", line 580, in generate_atom_feeds
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/bayle/.local/lib/python3.7/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app.build(args.force_all, filenames)
  File "/home/bayle/.local/lib/python3.7/site-packages/sphinx/application.py", line 346, in build
    self.builder.build_update()
  File "/home/bayle/.local/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 299, in build_update
    len(to_build))
  File "/home/bayle/.local/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 364, in build
    self.finish()
  File "/home/bayle/.local/lib/python3.7/site-packages/sphinx/builders/html.py", line 633, in finish
    self.finish_tasks.add_task(self.gen_pages_from_extensions)
  File "/home/bayle/.local/lib/python3.7/site-packages/sphinx/util/parallel.py", line 42, in add_task
    res = task_func()
  File "/home/bayle/.local/lib/python3.7/site-packages/sphinx/builders/html.py", line 656, in gen_pages_from_extensions
    for pagename, context, template in pagelist:
RuntimeError: generator raised StopIteration
@tk0miya
Copy link
Member

tk0miya commented Oct 10, 2019

I guess you're using an extension not supporting py3 properly. The error was caused in gen_pages_from_extensions event. It is working to generate extra pages for extensions.

  File "/home/bayle/.local/lib/python3.7/site-packages/sphinx/builders/html.py", line 656, in gen_pages_from_extensions
    for pagename, context, template in pagelist:
RuntimeError: generator raised StopIteration

Please check your extensions and report this to them.
Thanks,

@baylessj
Copy link
Contributor Author

The error was in fact a result of an issue with my project/the Ablog package. This issue is tracked in sunpy/ablog#43.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants