liran-funaro / sphinx-markdown-builder

A Sphinx extension to add markdown generation support.
https://pypi.org/project/sphinx-markdown-builder
MIT License
32 stars 14 forks source link

When using the markdown builder, hit an assertion error[BUG] #3

Closed revati-naik closed 10 months ago

revati-naik commented 11 months ago

Describe the bug

sphinx_markdown_builder/contexts.py", line 208, in active_output
    assert self._active_output is not None
AssertionError

I have used this repo in my project directly. I have some .rst files for which I intend to generate the .md file. HTML builder works just fine.

Expected behavior I see a table as I see when I use the HTML builder type

Is there a specific format for the .rst file to be used? Any example would be appreciated.

liran-funaro commented 11 months ago

@revati-naik Thank you for taking the time to report the issue you encountered. Your contribution is truly appreciated!

Can you please provide a concise example (e.g., an RST file) that produces this error?

revati-naik commented 11 months ago

@revati-naik Thank you for taking the time to report the issue you encountered. Your contribution is truly appreciated!

Can you please provide a concise example (e.g., an RST file) that produces this error?

Would it be helpful to say that the HTML builder works just fine?

liran-funaro commented 11 months ago

No. I need to reproduce the error to know how to fix it.

liran-funaro commented 11 months ago

@revati-naik I need more information to find the bug's source. Please provide the full output log and/or a concise RST file that produces this error. The file does not have to be the exact RST file you use if you don't want to disclose private information. You can take the "problematic" table from your document, modify its content, and then share it here.

I have some suspicion regarding the source of the bug, but without more information, I cannot further investigate.

I've made some modifications based on my suspicions. Please try it out and let me know if it works for you.

You can install the latest modifications using:

pip uninstall sphinx-markdown-builder
pip install git+https://github.com/liran-funaro/sphinx-markdown-builder.git@main
revati-naik commented 11 months ago

@liran-funaro here is the sample .rst file

===============================
Title
===============================

.. extreq:: some description
    :id: SOME_ID
    :links: LINK_TO_OTHER_ID
    :integrity: INTEGRITY_LEVEL

    Some more content as information.
liran-funaro commented 11 months ago

I'm getting ERROR: Unknown directive type "extreq".

revati-naik commented 11 months ago

I'm getting ERROR: Unknown directive type "extreq".

extreq has been added as a directive under need type in the conf.py

liran-funaro commented 11 months ago

Can you please share the relevant part from your conf.py file?

flynneva commented 11 months ago

@liran-funaro im not sure if you need the custom conf.py at all. I'll make a PR really quick that modifies the tests you have to replicat the error we are seeing 👍🏼

flynneva commented 10 months ago

@liran-funaro I dont think this is actually an issue for us anymore, feel free to close this. It probably was a config issue on our end.