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

Another: NotImplementedError: None:None the 'desc_sig_space' node is not yet supported (rinoh.frontend.sphinx.nodes) #418

Open
1 task done
BobDenny opened this issue Aug 31, 2023 · 9 comments
Labels
bug crash rinohtype aborts due to an uncaught exception

Comments

@BobDenny
Copy link

BobDenny commented Aug 31, 2023

Is there an existing issue for this?

Possibly- #414

  • I have searched the existing issues

Sphinx or rinoh output

File "/home/pi/Documents/ASCOM-Master-Docs-2022/.venv/lib/python3.9/site-packages/rinoh/frontend/__init__.py", line 30, in map_node
    raise NotImplementedError("{}:{} the '{}' node is not yet supported "
NotImplementedError: None:None the 'desc_sig_space' node is not yet supported (rinoh.frontend.sphinx.nodes)

Source files

https://github.com/BobDenny/ASCOM-Master-Docs-2022

Noting here is private. I invoke as make rinoh. Ignore the two requirements.txt files Iam not a high-end developer or Linux expert

Versions

(.venv) pi@rpi1:~/Documents/ASCOM-Master-Docs-2022 $ rinoh --versions
rinohtype 0.5.4 (2022-06-17)
Sphinx 7.2.4
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110]
Linux-6.1.21-v8+-aarch64-with-glibc2.31
@BobDenny BobDenny added bug crash rinohtype aborts due to an uncaught exception labels Aug 31, 2023
@BobDenny
Copy link
Author

BobDenny commented Aug 31, 2023

I can't figure out how to find the flaw in my RST that is causing this. I'm not an expert. I don't know how to re-open a GitHub issue. I'm just a lowly documentation writer. What is a desc_sig_space node and wht ReStructuredText constructs can result in that? My docs build perfectly with no lint warnings, esbonio previews are perfect, ??? I'm stuck. I have been able to build with rinohtype in the past. This "just started happening" but of course I am editing my content :-)
sphinx-err-5etbarpp.log

@BobDenny
Copy link
Author

Oh I am sorry.. I did try the addition to conf.py from #414

from rinoh.frontend.rst import DocutilsInlineNode

class Desc_Sig_Space(DocutilsInlineNode):
    pass

and it is working. My concern is that there may be an error in the PDF that was hidden by this.

@brechtm
Copy link
Owner

brechtm commented Sep 15, 2023

This fix is now included in the development version. It is still not clear to me what is causing this, so it would be helpful if you can provide a (preferably minimal) Sphinx project that suffers from this issue.

This shouldn't cause any errors in the PDF. At worst, some content might be missing from the PDF. That should be easy to check with a minimal project. Have you noticed anything missing?

@brechtm
Copy link
Owner

brechtm commented Sep 15, 2023

BTW To figure out which content is causing an issue such as this, you can repeatedly remove (e.g. remove entries from toctree directives) parts of your document. When the document completes rendering, you know that the problematic content is part of what you removed. In a couple of steps, you can build this "minimal project" I mentioned above.

@BobDenny
Copy link
Author

OK, thank you! I have been diverted from this project for some time maybe weeks. I'll try to run these tests as soon as I can. Thank you for providing a way to get the PDF out!! While people review it maybe they will find out what's missing ha ha.

@BobDenny
Copy link
Author

Another

        raise AttributeError('No such element: {} in {}'.format(name, self))
    AttributeError: No such element: styled_text in <rinoh.frontend.rst.nodes.Definition_List object at 0x0000029E4BBE2710>

The previous bypass doesn't work for this. I made the virtually same changes in 10 RST files. No errors from Sphinx HTML build nor from Esbonio, and the HTML render from these is perfect. I've created a branch freezing the successful RST and will try to narrow this down. If you happen to have another bypass for this similar to that in #414 that would be cool. For now I'm OK with some missing bits. Thanks again for this great tool!!!

@brechtm
Copy link
Owner

brechtm commented Oct 16, 2023

I may be wrong, but this feels like an invalid Sphinx document tree. Unfortunately, Sphinx (or docutils) doesn't check whether a document tree is valid or not. A definition_list is a body-type element (versus inline), so the styled_text method should not be called on it.

This exception will occur if the definition_list element is included in another element as an inline element. Possibly a Sphinx plugin is to blame for this. I'll need a (preferably minimal) project to reproduce this. Since you seem to know which change triggered this issue, this should hopefully be fairly easy.

@BobDenny
Copy link
Author

Thank you so much. I was able to find this by setting a branch and incrementally replacing. One document had this. In the rendered HTML it was messy. My fault, but the gigantic error log (attached) was no help ha ha ha. I'm no wizard programmer. Adding a space before :raises DriverException: eliminated the problem.

Snap1

Oct 15 Rinoh Error.log

@brechtm
Copy link
Owner

brechtm commented Oct 17, 2023

Thank you for the donation, and great to hear that you were able to find the cause for this problem!

This is indeed one of the major pitfalls of reStructuredText. This hard-to-spot indentation mistake results in an invalid document tree, yet Sphinx happily continues and the HTML backend renders it anyway. I have run into subtle hard to debug issues caused by indentation mistakes multiple times myself.

If you feel up to it, please report this usability issue with the Sphinx project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug crash rinohtype aborts due to an uncaught exception
Projects
None yet
Development

No branches or pull requests

2 participants