bavovanachte / sphinx-wavedrom

A sphinx extension that allows including wavedrom diagrams by using its text-based representation
MIT License
34 stars 18 forks source link

wavedrom not working with make latexpdf #44

Closed oholimoli closed 2 years ago

oholimoli commented 2 years ago

Hi, I'm using this extension to generate the html with Sphinx and everything works fine. When I try to generate a pdf with make latexpdf I get a timeout after 120sec.

Is this a bug in the extension?

bavovanachte commented 2 years ago

Hi @oholimoli , do you have more details? An error log from latex perhaps? Or a minimal example that reproduces the issue?

oholimoli commented 2 years ago

The std_out of make latexpdf stops at the message: "writing ..." my timeout is 120sec. Sorry for not posting a complete example. Has latexpdf been working?

I will add a minimal example the next days.

bavovanachte commented 2 years ago

No worries. Yes, latexpdf is included in the CI pipelines, so tested regularly (it's failing for py3.10, but that's a wavedrompy issue).

How are you configuring the plugin? If you're not applying any configuration, the html build will use browser-rendered (js) images and the pdf will use wavedrom-cli. If that's the case, you might be facing the same issue as https://github.com/bavovanachte/sphinx-wavedrom/pull/43 (i.e. npx is waiting for user input and blocking the execution)

oholimoli commented 2 years ago

I captured the output. I will try to install the missing font. @bavovanachte do you know which fonts are needed? Not sure if other fonts are missing too. I'm currently only running a minimal example.

! LaTeX Error: File `tgtermes.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: ^C! Interruption.
oholimoli commented 2 years ago

In order to solve the problem with the missing fonts I made a new Docker image based on: sphinxdoc/sphinx-latexpdf:4.4.0. It has python 3.10 :(. It looks like I am stuck with this problem now. I will wait until this issue is resolved.

This is the error I get now:

Extension error:
Could not import extension sphinxcontrib.wavedrom (exception: cannot import name 'Mapping' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py))
make: *** [Makefile:20: html] Error 2
bavovanachte commented 2 years ago

Excellent, so now it's a duplicate of https://github.com/bavovanachte/sphinx-wavedrom/issues/38 (which is actually an issue of the wavedrom python implementation). Could you close this issue in favor of #38 ?