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

d2r raise Exception: AttributeError: 'str' object has no attribute 'supported' #9043

Closed
SergeyBridge opened this issue Apr 1, 2021 · 1 comment

Comments

@SergeyBridge
Copy link

SergeyBridge commented Apr 1, 2021

Describe the bug
I want to convert .md into .rst format
I added 'd2r' extention, there was an Exception occurred
extensions = [
'sphinx.ext.todo',
'sphinx.ext.githubpages',
'sphinx.ext.napoleon',
'sphinx.ext.autodoc',
'jupyter_sphinx',
'sphinx.ext.viewcode',
'm2r',
]
After removing 'd2r' there was not any problems with config.py .

To Reproduce
Steps to reproduce the behavior:

<Paste your command-line here which cause the problem>
$ pip install m2r
Requirement already satisfied: m2r in /home/sergey/anaconda3/envs/ExParallel/lib/python3.8/site-packages (0.2.1)
Requirement already satisfied: docutils in /home/sergey/anaconda3/envs/ExParallel/lib/python3.8/site-packages (from m2r) (0.16)
Requirement already satisfied: mistune in /home/sergey/anaconda3/envs/ExParallel/lib/python3.8/site-packages (from m2r) (0.8.4)

$ sphinx-build /home/sergey/source/   /home/sergey/docs
Running Sphinx v3.5.3
loading translations [ru]... done

Exception occurred:
  File "/home/sergey/anaconda3/envs/ExParallel/lib/python3.8/site-packages/sphinx/registry.py", line 267, in add_source_parser
    for filetype in parser.supported:
AttributeError: 'str' object has no attribute 'supported'
The full traceback has been saved in /tmp/sphinx-err-uu_jfl9i.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

**Expected behavior**
I expected my config.py running 

**Your project**
Link to your sphinx project, or attach zipped small project sample.
https://github.com/SergeyBridge/ExParallel/releases/tag/v0.01-alpha

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment info**
- OS: [Ubuntu 20.04 LTS]
- Python version: [Python 3.8.8]
- Sphinx version: [sphinx-build 3.5.3]
- Sphinx extensions:  [e.g. sphinx.ext.autodoc, recommonmark]
- Extra tools: [e.g. Browser, tex or something else]
extensions = [
    'sphinx.ext.todo',
    'sphinx.ext.githubpages',
    'sphinx.ext.napoleon',
    'sphinx.ext.autodoc',
    'jupyter_sphinx',
    'sphinx.ext.viewcode',
    'm2r',
]
**Additional context**
Add any other context about the problem here.

- [e.g. URL or Ticket]

@SergeyBridge SergeyBridge changed the title d2r extention is not added into config.py extentions d2r raise Exception: AttributeError: 'str' object has no attribute 'supported' Apr 1, 2021
@tk0miya
Copy link
Member

tk0miya commented Apr 2, 2021

It seems the latest release of m2r can not work with the latest Sphinx. Please check miyakogi/m2r#60.

Thanks,

@tk0miya tk0miya closed this as completed Apr 2, 2021
tomjnixon added a commit to ebu/libadm that referenced this issue May 12, 2021
m2r causes this issue sphinx-doc/sphinx#9043
so is replaced with m2r2
tomjnixon added a commit to ebu/libadm that referenced this issue Jun 8, 2021
m2r causes this issue sphinx-doc/sphinx#9043
so is replaced with m2r2
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 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