executablebooks / sphinx-tabs

Tabbed views for Sphinx
https://sphinx-tabs.readthedocs.io
MIT License
264 stars 68 forks source link

KeyError: 'tabs_stack' #112

Closed Sebanisu closed 3 years ago

Sebanisu commented 3 years ago

Describe the bug

Getting a key error when trying out the sample code from https://pradyunsg.me/furo/reference/tabs/

To Reproduce

Steps to reproduce the behavior:

  1. add sample tab code to my .md file
  2. compile docs
  3. get error

Expected behavior

A clear and concise description of what you expected to happen. I should have two tabs show in the generated html page.

A link to your documentation repository. https://github.com/Sebanisu/OpenVIII_CPP_WIP/tree/docs/docs

If relevant, a minimal example of the input text should be supplied, together with a screen-shot of the output document and/or command-line output, e.g.

pretend the \ isn't there.

\`\`\`{toctree}
\`\`\`

\`\`\`{tab} One
First.
\`\`\`

\`\`\`{tab} Two
Second.
\`\`\`

build command.

cmake -G "Ninja Multi-Config" -B build -DDOCS:STRING=YES
ninja -C build

Environment

traceback

# Sphinx version: 3.5.1
# Python version: 3.8.5 (CPython)
# Docutils version: 0.16 release
# Jinja2 version: 2.11.3
# Last messages:
#   Running Sphinx v3.5.1
#   myst v0.13.6: MdParserConfig(renderer='sphinx', commonmark_only=False, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, update_mathjax=True, enable_extensions=['dollarmath'], disable_syntax=[], url_schemes=None, heading_anchors=None, html_meta=[], footnote_transition=True, substitutions=[], sub_delimiters=['{', '}'])
#   building [mo]: targets for 0 po files that are out of date
#   building [html]: targets for 3 source files that are out of date
#   updating environment:
#   [new config]
#   3 added, 0 changed, 0 removed
#   reading sources... [ 33%] archive
# Loaded extensions:
#   sphinx.ext.mathjax (3.5.1) from /home/pcvii/.local/lib/python3.8/site-packages/sphinx/ext/mathjax.py
#   sphinxcontrib.applehelp (1.0.2) from /home/pcvii/.local/lib/python3.8/site-packages/sphinxcontrib/applehelp/__init__.py
#   sphinxcontrib.devhelp (1.0.2) from /home/pcvii/.local/lib/python3.8/site-packages/sphinxcontrib/devhelp/__init__.py
#   sphinxcontrib.htmlhelp (1.0.3) from /home/pcvii/.local/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py
#   sphinxcontrib.serializinghtml (1.1.4) from /home/pcvii/.local/lib/python3.8/site-packages/sphinxcontrib/serializinghtml/__init__.py
#   sphinxcontrib.qthelp (1.0.3) from /home/pcvii/.local/lib/python3.8/site-packages/sphinxcontrib/qthelp/__init__.py
#   alabaster (0.7.12) from /home/pcvii/.local/lib/python3.8/site-packages/alabaster/__init__.py
#   breathe (4.27.0) from /home/pcvii/.local/lib/python3.8/site-packages/breathe/__init__.py
#   myst_parser (0.13.6) from /home/pcvii/.local/lib/python3.8/site-packages/myst_parser/__init__.py
#   sphinx_tabs.tabs (unknown version) from /home/pcvii/.local/lib/python3.8/site-packages/sphinx_tabs/tabs.py
#   furo (2021.04.11.beta34) from /home/pcvii/.local/lib/python3.8/site-packages/furo/__init__.py
Traceback (most recent call last):
  File "/home/pcvii/.local/lib/python3.8/site-packages/sphinx/cmd/build.py", line 280, in build_main
    app.build(args.force_all, filenames)
  File "/home/pcvii/.local/lib/python3.8/site-packages/sphinx/application.py", line 352, in build
    self.builder.build_update()
  File "/home/pcvii/.local/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 296, in build_update
    self.build(to_build,
  File "/home/pcvii/.local/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 310, in build
    updated_docnames = set(self.read())
  File "/home/pcvii/.local/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 417, in read
    self._read_serial(docnames)
  File "/home/pcvii/.local/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 438, in _read_serial
    self.read_doc(docname)
  File "/home/pcvii/.local/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 478, in read_doc
    doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
  File "/home/pcvii/.local/lib/python3.8/site-packages/sphinx/io.py", line 221, in read_doc
    pub.publish()
  File "/home/pcvii/.local/lib/python3.8/site-packages/docutils/core.py", line 217, in publish
    self.document = self.reader.read(self.source, self.parser,
  File "/home/pcvii/.local/lib/python3.8/site-packages/sphinx/io.py", line 126, in read
    self.parse()
  File "/home/pcvii/.local/lib/python3.8/site-packages/docutils/readers/__init__.py", line 77, in parse
    self.parser.parse(self.input, document)
  File "/home/pcvii/.local/lib/python3.8/site-packages/myst_parser/sphinx_parser.py", line 65, in parse
    parser.renderer.render(tokens, parser.options, env)
  File "/home/pcvii/.local/lib/python3.8/site-packages/myst_parser/docutils_renderer.py", line 174, in render
    self.rules[f"render_{nest_token.type}"](nest_token)
  File "/home/pcvii/.local/lib/python3.8/site-packages/myst_parser/docutils_renderer.py", line 449, in render_fence
    return self.render_directive(token)
  File "/home/pcvii/.local/lib/python3.8/site-packages/myst_parser/docutils_renderer.py", line 939, in render_directive
    nodes_list = self.run_directive(name, arguments, content, position)
  File "/home/pcvii/.local/lib/python3.8/site-packages/myst_parser/docutils_renderer.py", line 1022, in run_directive
    result = directive_instance.run()
  File "/home/pcvii/.local/lib/python3.8/site-packages/sphinx_tabs/tabs.py", line 141, in run
    tabs_id = self.env.temp_data["tabs_stack"][-1]
KeyError: 'tabs_stack'
welcome[bot] commented 3 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

foster999 commented 3 years ago

Hi @Sebanisu, I'm afraid this example is for another package: 'sphinx-inline-tabs'

Sebanisu commented 3 years ago

oh sorry about that.