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

assert 'Verbatim' in lines[0] #9458

Closed
jaidisido opened this issue Jul 16, 2021 · 7 comments
Closed

assert 'Verbatim' in lines[0] #9458

jaidisido opened this issue Jul 16, 2021 · 7 comments

Comments

@jaidisido
Copy link

Describe the bug

Upgrading sphinx from 4.0.3 to 4.1.0 raises an nbsphinx exception when building docs in ReadTheDocs:
writing... failed

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/aws-data-wrangler/conda/latest/lib/python3.9/site-packages/nbsphinx.py", line 2151, in depart_codearea_latex
    assert 'Verbatim' in lines[0]
AssertionError
The full traceback has been saved in /tmp/sphinx-err-332dfpxm.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.

How to Reproduce

Error happens in ReadTheDocs build so not sure how to reproduce. Building locally works fine:
https://github.com/awslabs/aws-data-wrangler/blob/main/building/build-docs.sh

Expected behavior

No response

Your project

https://github.com/awslabs/aws-data-wrangler/tree/main/docs

Screenshots

No response

OS

Catalina

Python version

3.9

Sphinx version

4.1.0

Sphinx extensions

sphinx==4.0.3 sphinx_bootstrap_theme==0.7.1 nbsphinx==0.8.6 nbsphinx-link==1.3.0

Extra tools

No response

Additional context

No response

@mgeier
Copy link
Contributor

mgeier commented Jul 16, 2021

I think this is the same as spatialaudio/nbsphinx#584.

As mentioned there, the problem exists since #9166.

This issue could be either fixed here or in nbsphinx.

@dham Do you have an idea how to best solve this?

@jfbu
Copy link
Contributor

jfbu commented Jul 19, 2021

As commented at spatialaudio/nbsphinx#584, the #9166 transforms container classes into LaTeX environment. This upsets the nbsphinx.depart_codearea_latex(), as first line is not as expected. Simply removing from this procedure the two assert seems to solve the issue, as the output LaTeX code is then valid.

The #9166 provides opportunity to abstract away from output latex the latex additions done by the nbsphinx code and put them into suitable sphinxnbinput or sphinxnboutput environment definitions. This I hope can be done in a conditional way, even entirely from LaTeX by testing if \sphinxuseclass is defined (as it is the master dispatch to individual LaTeX environments).

@jfbu
Copy link
Contributor

jfbu commented Jul 19, 2021

The #9166 provides opportunity to abstract away from output latex the latex additions done by the nbsphinx code and put them into suitable sphinxnbinput or sphinxnboutput environment definitions. T

sorry I meant sphinxclassnbinput and sphinxclassnboutput.

fuyans added a commit to fuyans/sfeprapy-doc that referenced this issue Aug 9, 2021
@jaidisido
Copy link
Author

I see that issue spatialaudio/nbsphinx#584 which is related to this has been merged and closed. Does this mean it will be fixed in the next sphinx release (4.1.3)? Thanks

@tk0miya
Copy link
Member

tk0miya commented Aug 10, 2021

No, it will be fixed in the next nbsphinx's release instead of Sphinx. I think there is nothing to do on Sphinx side. So I'm closing this.
Thanks,

@mgeier
Copy link
Contributor

mgeier commented Aug 10, 2021

it will be fixed in the next nbsphinx's release

Yes indeed. I've just made a new nbsphinx release (version 0.8.7) which should fix the issue.

@jaidisido
Copy link
Author

Confirm upgrading to 0.8.7 solved this, thanks for the fix

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2021
runlevel0 added a commit to ajansen-tub/pyomac that referenced this issue Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants