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

Sphinx 3.3.0 Release raises an attribute error #13

Closed
mtreinish opened this issue Nov 2, 2020 · 5 comments
Closed

Sphinx 3.3.0 Release raises an attribute error #13

mtreinish opened this issue Nov 2, 2020 · 5 comments

Comments

@mtreinish
Copy link

The recent sphinx 3.3.0 release has started failing docs builds. It raises:

Exception occurred:
  File "/home/runner/work/retworkx/retworkx/.tox/docs/lib/python3.8/site-packages/sphinx/registry.py", line 266, in add_source_parser
    for filetype in parser.supported:
AttributeError: 'str' object has no attribute 'supported'

https://github.com/Qiskit/retworkx/pull/166/checks?check_run_id=1342230330#step:7:16

Looking at the debug logging locally the error is coming from m2r2 when trying to add the source parser.

mtreinish added a commit to mtreinish/retworkx that referenced this issue Nov 2, 2020
The recent sphinx 3.3.0 release today has started causing doc build
failures in CI. This is being caused by an issue with the m2r2 extension
used to render the README in the docs builds (see CrossNox/m2r2#13).
This commit caps the sphinx version until there is a new m2r2 release
fixing compatibility with sphinx >=3.3.0.
mtreinish added a commit to Qiskit/rustworkx that referenced this issue Nov 2, 2020
The recent sphinx 3.3.0 release today has started causing doc build
failures in CI. This is being caused by an issue with the m2r2 extension
used to render the README in the docs builds (see CrossNox/m2r2#13).
This commit caps the sphinx version until there is a new m2r2 release
fixing compatibility with sphinx >=3.3.0.
@sobolevn
Copy link

sobolevn commented Nov 3, 2020

The same for me:


Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/wemake-python-styleguide/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 279, in build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/home/docs/checkouts/readthedocs.org/user_builds/wemake-python-styleguide/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 245, in __init__
    self.setup_extension(extension)
  File "/home/docs/checkouts/readthedocs.org/user_builds/wemake-python-styleguide/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 402, in setup_extension
    self.registry.load_extension(self, extname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/wemake-python-styleguide/envs/latest/lib/python3.7/site-packages/sphinx/registry.py", line 429, in load_extension
    metadata = setup(app)
  File "/home/docs/checkouts/readthedocs.org/user_builds/wemake-python-styleguide/envs/latest/lib/python3.7/site-packages/m2r2.py", line 664, in setup
    app.add_source_parser(".md", M2RParser)  # for older sphinx versions
  File "/home/docs/checkouts/readthedocs.org/user_builds/wemake-python-styleguide/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 1136, in add_source_parser
    self.registry.add_source_parser(parser, override=override)
  File "/home/docs/checkouts/readthedocs.org/user_builds/wemake-python-styleguide/envs/latest/lib/python3.7/site-packages/sphinx/registry.py", line 266, in add_source_parser
    for filetype in parser.supported:
AttributeError: 'str' object has no attribute 'supported'

@devopsec
Copy link

I can confirm this is still an issue, see attached sphinx log for version info, etc..
sphinx.log

@sobolevn
Copy link

@CrossNox any update on this? I don't want to create m2r3 🙂

cspaier added a commit to Pydiderot/pydiderotIDE that referenced this issue Nov 18, 2020
@CrossNox
Copy link
Owner

Thanks to @dcaba this should now be fixed. Please check version 0.2.6.

@dcaba
Copy link

dcaba commented Nov 20, 2020

I confirm this is now working for me. Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants