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

Error in "markdown-ingest" directive: no content permitted #3

Open
felicitymay opened this issue May 14, 2019 · 1 comment
Open

Error in "markdown-ingest" directive: no content permitted #3

felicitymay opened this issue May 14, 2019 · 1 comment

Comments

@felicitymay
Copy link

This looks like a really useful extension for Sphinx - markdown tables are really handy.
I'm having trouble setting this up. I think that my configuration is correct, as described in the Read me file, but I get the Error in "markdown-ingest" directive: no content permitted. error when I build the Sphinx output.

My rst file has:

.. markdown-ingest::
    filename: analysis-csharp.md

and analysis-csharp.md is in the same directory as the rst file.

I'd be very grateful if you could help me debug this.

@cweidner3
Copy link

cweidner3 commented Sep 25, 2020

I'm not sure if this is being maintained, but I did figure out how to get this working from v1.0.2 pulled from pypi.

 .. markdown-ingest::
-     filename: analysis-csharp.md
+    :filename: analysis-csharp.md

But this still ended up with another error for me.

Exception occurred:
  File "/home/cweidner3/scripts/cw_artifactory_queries/.venv/lib/python3.8/site-packages/sphinx_markdown/nodes.py", line 22, in load_markdown
    text = unicode(handle.read().decode('utf-8'))
NameError: name 'unicode' is not defined

and

Extension error:
Handler <function handle_page_context_html at 0x7f802dcdfee0> for event 'html-page-context' threw an exception (exception: write() argument must be str, not bytes)

I had to change nodes.py and search.py to support python3 changes such as decode() becoming str(). Also open() by defaults to str mode instead of bytes mode.

Edit: included other error output.

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

2 participants