-
Notifications
You must be signed in to change notification settings - Fork 252
"NoneType object is not callable" when trying to link between documents #93
Comments
Notably, this works again when you add app.add_config_value('recommonmark_config', {
'enable_auto_doc_ref': False,
}, True) So it must be related to the |
Same here, unfortunately setting What I've noticed instead is that using |
On the README, it says that |
Hi, I have the exactly same issue when I use nested list of links
If I switch to It also works when the list is flat:
So I'm block can you help me ? |
I had the same issue. I managed to fix it changing the flile And then all works fine. |
The best workaround would seem to be installing latest code from the git repo:
To specify branch or commit see: https://stackoverflow.com/a/13754517/175584 Edit: I ran into new issues with master branch so ended up using patch below. Alternatively based on @mvancanneyt change, a hacky monkey patch can be applied to recommonmark 0.4 in the sphinx config by adding this near the top of from recommonmark.states import DummyStateMachine
# Monkey patch to fix recommonmark 0.4 doc reference issues.
orig_run_role = DummyStateMachine.run_role
def run_role(self, name, options=None, content=None):
if name == 'doc':
name = 'any'
return orig_run_role(self, name, options, content)
DummyStateMachine.run_role = run_role @pfultz2 I was confused by this, however if you look at the PyPi release date it is 0.4 (Jan 2016) whereas the deprecation change occurred in Mar 2017. So for recommonmark 0.4 |
- Change the layout and contents of docs to be better organised and follow ideas from: https://www.divio.com/blog/documentation/ - Use markdown for non-technical documents to speed up writing. - Added new sections and imported documents from Trac wiki. Build fixes: - Added a patch to fix recommonmark 0.4 and doc referencing: readthedocs/recommonmark#93 - Set docs build in tox to Py2.7 since there are problems with autodoc mocking multiple inheritance on Python 3 resulting in metaclass errors. - Supressed warning about `modules.rst` not in the toctree by creating a static `modules.rst` with `:orphan:` file directive and add to git. Also skip creating this toc file with sphinx-apidoc in setup and tox. - Simplified finding exported RPC and JSON API methods by adding an autodoc custom class directive. Removed unneeded __rpcapi.py.
- Change the layout and contents of docs to be better organised and follow ideas from: https://www.divio.com/blog/documentation/ - Use markdown for non-technical documents to speed up writing. - Added new sections and imported documents from Trac wiki. Build fixes: - Added a patch to fix recommonmark 0.4 and doc referencing: readthedocs/recommonmark#93 - Set docs build in tox to Py2.7 since there are problems with autodoc mocking multiple inheritance on Python 3 resulting in metaclass errors. - Supressed warning about `modules.rst` not in the toctree by creating a static `modules.rst` with `:orphan:` file directive and add to git. Also skip creating this toc file with sphinx-apidoc in setup and tox. - Simplified finding exported RPC and JSON API methods by adding an autodoc custom class directive. Removed unneeded __rpcapi.py.
Are there plans to incorporate this fix into the next release? I'm currently blocked by this issue as well. When I hard code the change like @mvancanneyt it works, but the hacky monkey patch that @cas-- offered hasn't worked for me yet - I'm adding the PatchDummyStateMachine to the top of my conf.py, but it's not catching the override when I build. Does anyone have any feedback on why it isn't working? My conf.py file is here: https://github.com/michaeldboyd/indy-sdk/blob/sphinx-docs-test/docs/conf.py Thanks |
My patch has to be applied after other recommonmark imports, otherwise it'll be reverted. |
@cas-- Hmm, I've changed my conf.py so that your patch is applied after all the other imports. My sphinx build is still giving me this error below:
Thank you for your help, do you have any other ideas why this might not be working? |
Ah oops, it seems my refactor of the patch didn't work (along with not getting that error anymore didn't catch that) so try my original patch: from recommonmark.states import DummyStateMachine
# Monkey patch to fix recommonmark 0.4 doc reference issues.
orig_run_role = DummyStateMachine.run_role
def run_role(self, name, options=None, content=None):
if name == 'doc':
name = 'any'
return orig_run_role(self, name, options, content)
DummyStateMachine.run_role = run_role |
Great! That works. Thank you for the help. |
Are there plans to incorporate a fix for this in a future release? |
Apply a local fix to an issue with recommonmark's AutoStructify extension when used with certain versions of sphinx. See readthedocs/recommonmark#93 Reviewed By: hans Differential Revision: https://reviews.llvm.org/D87714
Apply a local fix to an issue with recommonmark's AutoStructify extension when used with certain versions of sphinx. See readthedocs/recommonmark#93 Reviewed By: hans Differential Revision: https://reviews.llvm.org/D87714 (cherry picked from commit af56be3)
Apply a local fix to an issue with recommonmark's AutoStructify extension when used with certain versions of sphinx. See readthedocs/recommonmark#93 Reviewed By: hans Differential Revision: https://reviews.llvm.org/D87714
I've noticed that adding a hyperlink between documents, when AutoStructify is enabled, causes the following error:
For a full example, clone this repo (https://github.com/TMiguelT/Sphinx-Bug-AutoStructify) and run
The full error log is here:
The text was updated successfully, but these errors were encountered: