Open BobDenny opened 1 year ago
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
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.
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?
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.
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.
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!!!
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 _definitionlist is a body-type element (versus inline), so the _styledtext method should not be called on it.
This exception will occur if the _definitionlist 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.
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.
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.
Is there an existing issue for this?
Possibly- https://github.com/brechtm/rinohtype/issues/414
Sphinx or rinoh output
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 expertVersions