sphinx-contrib / sphinx-contrib/openapi

Cannot build using Sphinx v4.5.0

Open
#133 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
126
Forks
88
PR merge metrics
No merged PRs in 30d

Description

I'm trying to figure out some convenient way to generate html for endpoints in our organization and since I came across your plugin, I was ecstatic.

Unfortunately I am unable to compile the project correctly after using the plugin. As far as I can see, the project looks relatively abandoned. At least I'll leave you here witha traceback, if it'll be of any use.

# Sphinx version: 4.5.0
# Python version: 3.10.8 (CPython)
# Docutils version: 0.17.1 release
# Jinja2 version: 3.1.2
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "C:\Users\asenkyrik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\sphinx\cmd\build.py", line 272, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "C:\Users\asenkyrik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\sphinx\application.py", line 223, in __init__
    self.setup_extension(extension)
  File "C:\Users\asenkyrik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\sphinx\application.py", line 380, in setup_extension
    self.registry.load_extension(self, extname)
  File "C:\Users\asenkyrik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\sphinx\registry.py", line 425, in load_extension
    mod = import_module(extname)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\asenkyrik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\sphinxcontrib\openapi\__init__.py", line 13, in <module>
    from sphinxcontrib.openapi import renderers, directive
  File "C:\Users\asenkyrik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\sphinxcontrib\openapi\renderers\__init__.py", line 4, in <module>
    from ._httpdomain_old import HttpdomainOldRenderer
  File "C:\Users\asenkyrik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\sphinxcontrib\openapi\renderers\_httpdomain_old.py", line 6, in <module>
    from .. import openapi20, openapi30, utils
  File "C:\Users\asenkyrik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\sphinxcontrib\openapi\openapi20.py", line 16, in <module>
    from sphinxcontrib.openapi import utils
  File "C:\Users\asenkyrik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\sphinxcontrib\openapi\utils.py", line 20, in <module>
    from m2r import convert as convert_markdown
  File "C:\Users\asenkyrik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\m2r.py", line 59, in <module>
    class RestBlockGrammar(mistune.BlockGrammar):
AttributeError: module 'mistune' has no attribute 'BlockGrammar'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the build with Sphinx 4.5.0, Python 3.10.8, Docutils 0.17.1, and Jinja2 3.1.2, then trace the import from sphinxcontrib/openapi/utils.py through m2r.py until the mistune error occurs. Confirm the fix by rerunning the Sphinx build successfully with the reported environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.