Discussion:
How do I make an include directive work with nested_parse?
Peter Burdine
2016-08-24 19:59:20 UTC
Permalink
I am using the jinja plugin, but I am not sure that is exactly the problem
at the moment, it seems like this might be a more generic issue.

If I try to pass an include directive to nested_parse or
nested_parse_with_titles, I get the same result.

The run block of the directive can be simplified to:
def run(self):
node = nodes.Element()
#self.state.nested_parse(['.. include:: somefile'],
# self.content_offset,
# node,
# match_titles=1)
sphinx.util.nodes.nested_parse_with_titles(self.state,
['.. include:: somefile'
],
node)
return node.children

Is there something that can be done to enable the include directive to be
used inside the nested_parse or am I missing something?

The sphinx stack trace can be seen here:
sphinx.util.nodes.nested_parse_with_titles(self.state, ['.. include::
somefile'], node)
File "/usr/lib/python2.7/site-packages/sphinx/util/nodes.py", line 177, in
nested_parse_with_titles
return state.nested_parse(content, 0, node, match_titles=1)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 282, in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 239
, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 460
, in check_line
return method(match, context, next_state)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2299, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2311, in explicit_construct
return method(self, expmatch)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2054, in directive
directive_class, match, type_name, option_presets)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2103, in run_directive
result = directive_instance.run()
File "/usr/lib/python2.7/site-packages/sphinx/directives/other.py", line
409, in run
return BaseInclude.run(self)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/directives/misc.py",
line 59, in run
source_dir = os.path.dirname(os.path.abspath(source))
File "/usr/lib/python2.7/posixpath.py", line 360, in abspath
if not isabs(path):
File "/usr/lib/python2.7/posixpath.py", line 54, in isabs
return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Peter Burdine
2016-08-24 20:00:06 UTC
Permalink
I forgot to mention, I am currently running Sphinx 1.4.4.
Post by Peter Burdine
I am using the jinja plugin, but I am not sure that is exactly the problem
at the moment, it seems like this might be a more generic issue.
If I try to pass an include directive to nested_parse or
nested_parse_with_titles, I get the same result.
node = nodes.Element()
#self.state.nested_parse(['.. include:: somefile'],
# self.content_offset,
# node,
# match_titles=1)
sphinx.util.nodes.nested_parse_with_titles(self.state,
somefile'],
node)
return node.children
Is there something that can be done to enable the include directive to be
used inside the nested_parse or am I missing something?
somefile'], node)
File "/usr/lib/python2.7/site-packages/sphinx/util/nodes.py", line 177,
in nested_parse_with_titles
return state.nested_parse(content, 0, node, match_titles=1)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 282, in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line
239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line
460, in check_line
return method(match, context, next_state)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2299, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2311, in explicit_construct
return method(self, expmatch)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2054, in directive
directive_class, match, type_name, option_presets)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2103, in run_directive
result = directive_instance.run()
File "/usr/lib/python2.7/site-packages/sphinx/directives/other.py",
line 409, in run
return BaseInclude.run(self)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/directives/misc.py"
, line 59, in run
source_dir = os.path.dirname(os.path.abspath(source))
File "/usr/lib/python2.7/posixpath.py", line 360, in abspath
File "/usr/lib/python2.7/posixpath.py", line 54, in isabs
return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Komiya Takeshi
2016-08-27 15:33:56 UTC
Permalink
Hi,

It seems "nested_parse_with_titles" is only used at sphinx.ext.autodoc.
And it replaces reporter object with AutodocReporter before using the
function.

In my environment, the following code does not raise any exceptions:
from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.statemachine import ViewList
import sphinx.util.nodes
from sphinx.ext.autodoc import AutodocReporter


class MyDirective(Directive):
has_content = True

def run(self):
try:
self.result = ViewList(self.content, source='')
old_reporter = self.state.memo.reporter
self.state.memo.reporter = AutodocReporter(self.result,
self.state.memo.reporter)

node = nodes.Element()
sphinx.util.nodes.nested_parse_with_titles(self.state,
self.result, node)
return node.children
finally:
self.state.memo.reporter = old_reporter

I don't know this is correct or not. It seems any hack are required to use
the function.
I feel this is not useful...

Thanks,
Takeshi KOMIYA
Post by Peter Burdine
I am using the jinja plugin, but I am not sure that is exactly the problem
at the moment, it seems like this might be a more generic issue.
If I try to pass an include directive to nested_parse or
nested_parse_with_titles, I get the same result.
node = nodes.Element()
#self.state.nested_parse(['.. include:: somefile'],
# self.content_offset,
# node,
# match_titles=1)
sphinx.util.nodes.nested_parse_with_titles(self.state,
somefile'],
node)
return node.children
Is there something that can be done to enable the include directive to be
used inside the nested_parse or am I missing something?
somefile'], node)
File "/usr/lib/python2.7/site-packages/sphinx/util/nodes.py", line 177,
in nested_parse_with_titles
return state.nested_parse(content, 0, node, match_titles=1)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 282, in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line
239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line
460, in check_line
return method(match, context, next_state)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2299, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2311, in explicit_construct
return method(self, expmatch)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2054, in directive
directive_class, match, type_name, option_presets)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2103, in run_directive
result = directive_instance.run()
File "/usr/lib/python2.7/site-packages/sphinx/directives/other.py",
line 409, in run
return BaseInclude.run(self)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/directives/misc.py"
, line 59, in run
source_dir = os.path.dirname(os.path.abspath(source))
File "/usr/lib/python2.7/posixpath.py", line 360, in abspath
File "/usr/lib/python2.7/posixpath.py", line 54, in isabs
return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Peter Burdine
2016-09-01 21:44:03 UTC
Permalink
Actually that was helpful, though I had to look into the docutils code a
bit. The original Jinja extension did something like::
sphinx.util.nodes.nested_parse_with_titles(self.state,
StringList(self.content.
splitlines()),
node)

For some reason that works most of the time, but it wouldn't work for
includes. It is actually the ViewList object that makes it work. If I
replace the StringList object with the ViewList object then it renders
correctly
sphinx.util.nodes.nested_parse_with_titles(self.state,
ViewList(new_content.
splitlines(), source=''),
node)

I did not have to modify the reporter.


Is it possible to get that tidbit of info added to the bottom of
http://www.sphinx-doc.org/en/stable/extdev/markupapi.html, which describes
how to use this API so others won't get stuck?

Thanks,
Peter
Post by Komiya Takeshi
Hi,
It seems "nested_parse_with_titles" is only used at sphinx.ext.autodoc.
And it replaces reporter object with AutodocReporter before using the
function.
from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.statemachine import ViewList
import sphinx.util.nodes
from sphinx.ext.autodoc import AutodocReporter
has_content = True
self.result = ViewList(self.content, source='')
old_reporter = self.state.memo.reporter
self.state.memo.reporter = AutodocReporter(self.result,
self.state.memo.reporter)
node = nodes.Element()
sphinx.util.nodes.nested_parse_with_titles(self.state,
self.result, node)
return node.children
self.state.memo.reporter = old_reporter
I don't know this is correct or not. It seems any hack are required to use
the function.
I feel this is not useful...
Thanks,
Takeshi KOMIYA
Post by Peter Burdine
I am using the jinja plugin, but I am not sure that is exactly the
problem at the moment, it seems like this might be a more generic issue.
If I try to pass an include directive to nested_parse or
nested_parse_with_titles, I get the same result.
node = nodes.Element()
#self.state.nested_parse(['.. include:: somefile'],
# self.content_offset,
# node,
# match_titles=1)
sphinx.util.nodes.nested_parse_with_titles(self.state,
somefile'],
node)
return node.children
Is there something that can be done to enable the include directive to
be used inside the nested_parse or am I missing something?
sphinx.util.nodes.nested_parse_with_titles(self.state, ['..
include:: somefile'], node)
File "/usr/lib/python2.7/site-packages/sphinx/util/nodes.py", line 177,
in nested_parse_with_titles
return state.nested_parse(content, 0, node, match_titles=1)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 282, in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line
239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line
460, in check_line
return method(match, context, next_state)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2299, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2311, in explicit_construct
return method(self, expmatch)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2054, in directive
directive_class, match, type_name, option_presets)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2103, in run_directive
result = directive_instance.run()
File "/usr/lib/python2.7/site-packages/sphinx/directives/other.py",
line 409, in run
return BaseInclude.run(self)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/directives/misc.py"
, line 59, in run
source_dir = os.path.dirname(os.path.abspath(source))
File "/usr/lib/python2.7/posixpath.py", line 360, in abspath
File "/usr/lib/python2.7/posixpath.py", line 54, in isabs
return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Peter Burdine
2016-09-01 21:52:08 UTC
Permalink
Actually I should have read the page in more detail, it actually states
this pretty clearly. I was under the assumption that the original author
had done it correctly in the first place.

ViewLists

Docutils represents document source lines in a class
docutils.statemachine.ViewList. This is a list with extended functionality
– for one, slicing creates views of the original list, and also the list
contains information about the source line numbers.

The Directive.content
<http://www.sphinx-doc.org/en/stable/extdev/markupapi.html#docutils.parsers.rst.Directive.content>
attribute is a ViewList. If you generate content to be parsed as ReST, you
have to create a ViewList yourself. Important for content generation are
the following points:

- The constructor takes a list of strings (lines) and a source
(document) name.
- The .append() method takes a line and a source name as well.
Post by Peter Burdine
Actually that was helpful, though I had to look into the docutils code a
sphinx.util.nodes.nested_parse_with_titles(self.state,
StringList(self.content
.splitlines()),
node)
For some reason that works most of the time, but it wouldn't work for
includes. It is actually the ViewList object that makes it work. If I
replace the StringList object with the ViewList object then it renders
correctly
sphinx.util.nodes.nested_parse_with_titles(self.state,
ViewList(new_content.
splitlines(), source=''),
node)
I did not have to modify the reporter.
Is it possible to get that tidbit of info added to the bottom of
http://www.sphinx-doc.org/en/stable/extdev/markupapi.html, which
describes how to use this API so others won't get stuck?
Thanks,
Peter
Post by Komiya Takeshi
Hi,
It seems "nested_parse_with_titles" is only used at sphinx.ext.autodoc.
And it replaces reporter object with AutodocReporter before using the
function.
from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.statemachine import ViewList
import sphinx.util.nodes
from sphinx.ext.autodoc import AutodocReporter
has_content = True
self.result = ViewList(self.content, source='')
old_reporter = self.state.memo.reporter
self.state.memo.reporter = AutodocReporter(self.result,
self.state.memo.reporter)
node = nodes.Element()
sphinx.util.nodes.nested_parse_with_titles(self.state,
self.result, node)
return node.children
self.state.memo.reporter = old_reporter
I don't know this is correct or not. It seems any hack are required to
use the function.
I feel this is not useful...
Thanks,
Takeshi KOMIYA
Post by Peter Burdine
I am using the jinja plugin, but I am not sure that is exactly the
problem at the moment, it seems like this might be a more generic issue.
If I try to pass an include directive to nested_parse or
nested_parse_with_titles, I get the same result.
node = nodes.Element()
#self.state.nested_parse(['.. include:: somefile'],
# self.content_offset,
# node,
# match_titles=1)
sphinx.util.nodes.nested_parse_with_titles(self.state,
somefile'],
node)
return node.children
Is there something that can be done to enable the include directive to
be used inside the nested_parse or am I missing something?
sphinx.util.nodes.nested_parse_with_titles(self.state, ['..
include:: somefile'], node)
File "/usr/lib/python2.7/site-packages/sphinx/util/nodes.py", line 177
, in nested_parse_with_titles
return state.nested_parse(content, 0, node, match_titles=1)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py"
, line 282, in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py"
, line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py"
, line 2299, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py"
, line 2311, in explicit_construct
return method(self, expmatch)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py"
, line 2054, in directive
directive_class, match, type_name, option_presets)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py"
, line 2103, in run_directive
result = directive_instance.run()
File "/usr/lib/python2.7/site-packages/sphinx/directives/other.py",
line 409, in run
return BaseInclude.run(self)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/directives/misc.py"
, line 59, in run
source_dir = os.path.dirname(os.path.abspath(source))
File "/usr/lib/python2.7/posixpath.py", line 360, in abspath
File "/usr/lib/python2.7/posixpath.py", line 54, in isabs
return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
David Medina
2017-05-14 05:40:01 UTC
Permalink
Hi Komiya,

I'm having the same problem with nested_parse where I'm modifying the
Directive.content to with an include directive
In this case we wrap the rst conversion in a docutils.nodes.container,
where the container generates a tab div

Original rst in content:

[

'.. group-tab:: C++',
'',
' .. include:: path/to/my/file.rst' ,

'',

]


eventually gets translated into a nodes.container trying to nested_parse
the following:

[

'.. include:: path/to/my/file.rst' ,

'',

]


https://github.com/djungelorm/sphinx-tabs/blob/master/sphinx_tabs/tabs.py#L102

self.state.nested_parse(self.content[2:], self.content_offset, node)


Any help is appreciated, thank you!
David

Stack trace:


File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/sphinx_tabs/tabs.py",
line 103, in run
self.state.nested_parse(self.content[2:], self.content_offset, node,
match_titles=1)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 281, in nested_parse
node=node, match_titles=match_titles)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 2318, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 2330, in explicit_construct
return method(self, expmatch)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 2073, in directive
directive_class, match, type_name, option_presets)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 2122, in run_directive
result = directive_instance.run()
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/sphinx/directives/other.py",
line 409, in run
return BaseInclude.run(self)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/directives/misc.py",
line 59, in run
source_dir = os.path.dirname(os.path.abspath(source))
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/posixpath.py",
line 357, in abspath
if not isabs(path):
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/posixpath.py",
line 64, in isabs
return s.startswith(sep)
AttributeError: 'NoneType' object has no attribute 'startswith'
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Komiya Takeshi
2017-05-15 15:59:26 UTC
Permalink
Hi David,
Post by David Medina
self.state.nested_parse(self.content[2:], self.content_offset, node)
It seems you're slicing `self.content`, but `self.content_offset` is
not modifed.
I don't understand inside of nested_parse. but they might be related.
Please check it.

Thanks,
Takeshi KOMIYA
Post by David Medina
Hi Komiya,
I'm having the same problem with nested_parse where I'm modifying the
Directive.content to with an include directive
In this case we wrap the rst conversion in a docutils.nodes.container, where
the container generates a tab div
[
'.. group-tab:: C++',
'',
' .. include:: path/to/my/file.rst' ,
'',
]
eventually gets translated into a nodes.container trying to nested_parse the
[
'.. include:: path/to/my/file.rst' ,
'',
]
https://github.com/djungelorm/sphinx-tabs/blob/master/sphinx_tabs/tabs.py#L102
self.state.nested_parse(self.content[2:], self.content_offset, node)
Any help is appreciated, thank you!
David
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/sphinx_tabs/tabs.py",
line 103, in run
self.state.nested_parse(self.content[2:], self.content_offset, node,
match_titles=1)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 281, in nested_parse
node=node, match_titles=match_titles)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 2318, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 2330, in explicit_construct
return method(self, expmatch)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 2073, in directive
directive_class, match, type_name, option_presets)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/states.py",
line 2122, in run_directive
result = directive_instance.run()
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/sphinx/directives/other.py",
line 409, in run
return BaseInclude.run(self)
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/docutils/parsers/rst/directives/misc.py",
line 59, in run
source_dir = os.path.dirname(os.path.abspath(source))
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/posixpath.py",
line 357, in abspath
File
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/posixpath.py",
line 64, in isabs
return s.startswith(sep)
AttributeError: 'NoneType' object has no attribute 'startswith'
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...