Open BobDenny opened 1 month ago
Additional info: It turns out that changing the [VARIABLES] serif_typeface, [default: Paragraph] font_size, or letting them default (comment out) will change where the error occurs (thermometer during rendering), or in some cases allow the document to render successfully. Always the same error though:
assert container.advance2(padding_border_bottom)
I think I need to understand what can set up the condtions for that specific error. I should mention this behavior is identical on Debian Linux.
So many things trigger this. I unwrapped some lines to prevent multiple spaces in the rendered paragraphs. This caused the same error.
Brecht -- What sort of things can cause this?
Exception occurred:
File "C:\Users\rdenn\AppData\Roaming\Python\Python311\site-packages\rinoh\flowable.py", line 297, in flow_inner
assert container.advance2(padding_border_bottom)
AssertionError
This is crazy. I decided to try finding the cause of the assert error in flowable.py, line 297 (assert container.advance2(padding_border_bottom
) by simply commenting it out. I thought it might help me understand what was causing rinoh to fail for me. Well, surprise, the problem vanished! I can render my giant document now, change the stylesheet settings, see those effects, etc.
I guess you can close this ticket unless you want to try to find out what conditions cause that assert to fail, and whether the assert being false can actually cause problems in the resulting document. For me, I can't find anything and I have really looked.
I'm glad you were able to work around the issue, but of course this assert is in place for a reason: this is definitely a bug. I was refactoring the Container.advance function, but didn't yet wrap this up completely. Hence the existence of advance and advance2.
Is there an existing issue for this?
Sphinx or rinoh output
Source files
Too complicated. I'm getting the above exception when processing a large package with API defs processed by autodoc/napoleon. I narrowed it down to this;
which is rendered by autodoc. By changing the
DestinationSideOfPier
toYo
in that one place, the entire document (loads of classes and property/method defs) renders in Rinoh. I'm a bit overwhelmed by all of the Element Styling info in the manual. I knowpadding_border_bottom
is an element style, and I looked in flowable.py but it's way above my head. It seems that that method name is longer than expected. But there are so many layers to this....Is this a bug, a limitation, or is there a possible solution that I can implement here?
Versions