spatialaudio / nbsphinx

:ledger: Sphinx source parser for Jupyter notebooks
https://nbsphinx.readthedocs.io/
MIT License
453 stars 130 forks source link

pdf / svg generation issue with new pandoc #317

Closed LocutusOfBorg closed 5 years ago

LocutusOfBorg commented 5 years ago

Hello, (please ask for more information in case I missed anything).

With the new pandoc 2.5 and new ghc 8.6.5 / texlive in Debian unstable, we are hitting a test failure in pdf generation, because of "can't include svg file"

https://ci.debian.net/data/autopkgtest/unstable/amd64/n/nbsphinx/2916428/log.gz

! LaTeX Error: Unknown graphics extension: .svg.

! LaTeX Error: Unknown graphics extension: .svg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.292 ...54518f516c4c0bc19d1ae86e01/version}.svg}}
                                                  %^^M
? 
! Emergency stop.
 ...                                              

l.292 ...54518f516c4c0bc19d1ae86e01/version}.svg}}
                                                  %^^M
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on nbsphinx.log.
Latexmk: Index file 'nbsphinx.idx' was written
Latexmk: List of undefined refs and citations:
  Reference `a-normal-rst-file::doc' on page 1 undefined on input line 269
Latexmk: Summary of warnings from last run of (pdf)latex:
  Latex failed to resolve 1 reference(s)
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 1
      Refer to 'nbsphinx.log' for details
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.
=== TeX engine is 'pdfTeX'
Latexmk: Errors, so I did not complete making targets
make: *** [Makefile:33: nbsphinx.pdf] Error 12

The run test is really simple, trying to build documentation

cp -prd README.rst doc $AUTOPKGTEST_TMP

cd $AUTOPKGTEST_TMP

python3 -m sphinx -b html doc doc-html

python3 -m sphinx -b latex doc doc-latex
make -C doc-latex all-pdf
mgeier commented 5 years ago

Are you sure this worked with older pandoc versions?

SVG images are simply not supported by LaTeX (or at least by pdflatex). But they can be converted automatically, see https://nbsphinx.readthedocs.io/en/0.4.2/markdown-cells.html#SVG-support-for-LaTeX.

LocutusOfBorg commented 5 years ago

This is an example of test with older pandoc... https://ci.debian.net/data/autopkgtest/unstable/amd64/n/nbsphinx/2860536/log.gz

LocutusOfBorg commented 5 years ago

Don't ask me how, but it worked before...

LocutusOfBorg commented 5 years ago

I started from Debian testing, upgraded everything except pandoc

Output written on nbsphinx.pdf (41 pages, 487297 bytes).
Transcript written on nbsphinx.log.
=== TeX engine is 'pdfTeX'
Latexmk: Index file 'nbsphinx.idx' was written
Latexmk: Log file says output to 'nbsphinx.pdf'
Latexmk: All targets () are up-to-date
make: Leaving directory '/tmp/pippo/doc-latex'
root@Unimatrix05-Bionic:/nbsphinx-0.4.2+ds# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  liblua5.1-0
Use 'sudo apt autoremove' to remove it.
The following packages will be upgraded:
  pandoc pandoc-data
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/16.1 MB of archives.
After this operation, 7874 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 51526 files and directories currently installed.)
Preparing to unpack .../pandoc_2.5-2_amd64.deb ...
Unpacking pandoc (2.5-2) over (2.2.1-3+b2) ...
Preparing to unpack .../pandoc-data_2.5-2_all.deb ...
Unpacking pandoc-data (2.5-2) over (2.2.1-3) ...
Setting up pandoc-data (2.5-2) ...
Setting up pandoc (2.5-2) ...
Processing triggers for man-db (2.8.7-3) ...
root@Unimatrix05-Bionic:/nbsphinx-0.4.2+ds# rm -rf /tmp/pippo/* && ./debian/tests/perform-doc 
Running Sphinx v1.8.5
making output directory...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 20 source files that are out of date
[snip]
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/omxzplm.fd)<<omx.cmap>>
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1zplm.fd)

LaTeX Font Warning: Font shape `T1/lmtt/m/n' undefined
(Font)              using `T1/cmr/m/n' instead on input line 224.

LaTeX Font Warning: Font shape `TS1/lmtt/m/n' undefined
(Font)              using `TS1/cmr/m/n' instead
(Font)              for symbol `textquotesingle' on input line 1.

LaTeX Warning: Hyper reference `a-normal-rst-file::doc' on page 1 undefined on 
input line 269.

LaTeX Warning: Reference `a-normal-rst-file::doc' on page 1 undefined on input 
line 269.

! LaTeX Error: Unknown graphics extension: .svg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.292 ...54518f516c4c0bc19d1ae86e01/version}.svg}}
                                                  %^^M
? 
! LaTeX Error: Unknown graphics extension: .svg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.292 ...54518f516c4c0bc19d1ae86e01/version}.svg}}
                                                  %^^M
? [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]

! LaTeX Error: Unknown graphics extension: .svg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.314 ...a8456b3d03b8794cac/python:nbsphinx}.svg}}
mgeier commented 5 years ago

OK, I see that you are trying to build the PDF documentation of nbsphinx itself.

This hasn't worked for a long time, because the "badges" on the "Installation" page are (remote) SVG files.

Probably in earlier versions the error was somehow ignored, but I assume it was already there.

The solution would be to auto-convert SVG images to PDF. I've tried this, but it doesn't work yet: #319

I think this is because auto-downloading SVGs and auto-converting them doesn't play well together, but I'm not sure.

If you have any further ideas, please let me know.

LocutusOfBorg commented 5 years ago

So, your suggestion is to just disable the above test, and live happy? because it is what I'm doing right now :) I don't think such configuration can be supported, and our builders can't download stuff from the internet. If it was silently failing before, better disable it now

mgeier commented 5 years ago

So, your suggestion is to just disable the above test, and live happy?

No, that wasn't my suggestion at all. My suggestion was to fix the problem with something like #319, but I don't know yet how to make it work.

our builders can't download stuff from the internet.

OK, then the build should arguably fail, because the documentation does contain a few images that are supposed to be downloaded from the internet.

If it was silently failing before, better disable it now

It was failing before in the sense that there were some error messages in the LaTeX run, but a PDF file was created in the end. It just didn't have the SVG "badges" in it (see e.g. https://readthedocs.org/projects/nbsphinx/downloads/pdf/0.4.2/#subsection.1.1).

I do want to fix this, I just haven't found a solution yet.

But anyway, if there is no internet connection during LaTeX/PDF creation, this part of the tests should probably be disabled.

mgeier commented 5 years ago

So I looked into this a bit further, and found the culprit, see #319.

However, building the docs without internet connection still doesn't work (and I'm not planning to change that).

LocutusOfBorg commented 5 years ago

yes, I was wrong, when that testsuite runs, internet is enabled (we have build process that has no internet, but this case is the autopkgtests, with full hw/internet access)

mgeier commented 5 years ago

OK, great, I've just merged ~#318~ [EDIT: #319], that means that master should now build without errors (assuming that you have librsvg2-bin installed, see https://nbsphinx.readthedocs.io/en/0.4.2/markdown-cells.html#SVG-support-for-LaTeX).

LocutusOfBorg commented 5 years ago

I think you mean #319 :) anyhow, in order to use it, I have to package this one https://github.com/sephalon/sphinxcontrib-svg2pdfconverter

mgeier commented 5 years ago

Yes indeed!

anyhow, in order to use it, I have to package this one https://github.com/sephalon/sphinxcontrib-svg2pdfconverter

Yes, is this a problem?

Or is there an alternative I should use?

LocutusOfBorg commented 5 years ago

No problem, I'll package it for Debian and Ubuntu and use it :)

LocutusOfBorg commented 5 years ago

Closing the issue in the meanwhile

LocutusOfBorg commented 5 years ago

I have to reopen, for some reasons after packaging the converter, and applying your PR, I still get a failure...

  nbconvert.utils.pandoc.check_pandoc_version()
/usr/lib/python3/dist-packages/nbsphinx.py:1174: RuntimeWarning: You are using an unsupported version of pandoc (2.5).                                                                                      
Your version must be at least (1.12.1) but less than (2.0.0).
Refer to http://pandoc.org/installing.html.
Continuing with doubts...
  nbconvert.utils.pandoc.check_pandoc_version()

WARNING: could not open bibtex file /tmp/pluto/doc/references.bib.
/tmp/pluto/doc/code-cells.ipynb:596: WARNING: File not found: 'ipython_kernel_config.py'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
processing nbsphinx.tex...index installation usage markdown-cells code-cells raw-cells hidden-cells executing-notebooks pre-executed never-execute allow-errors timeout prolog-and-epilog custom-formats subdir/a-notebook-in-a-subdir subdir/toctree yet-another a-normal-rst-file links 
resolving references...
/tmp/pluto/doc/markdown-cells.ipynb:157: WARNING: citation not found: kluyver2016jupyter
/tmp/pluto/doc/markdown-cells.ipynb:163: WARNING: citation not found: perez2011python
/tmp/pluto/doc/a-normal-rst-file.rst:173: WARNING: citation not found: perez2011python
/tmp/pluto/doc/installation.ipynb:: WARNING: a suitable image for latex builder not found: ['image/svg+xml'] (https://anaconda.org/conda-forge/nbsphinx/badges/version.svg)
/tmp/pluto/doc/installation.ipynb:: WARNING: a suitable image for latex builder not found: ['image/svg+xml'] (https://repology.org/badge/vertical-allrepos/python:nbsphinx.svg)
/tmp/pluto/doc/installation.ipynb:: WARNING: a suitable image for latex builder not found: ['image/svg+xml'] (https://badge.fury.io/py/nbsphinx.svg)
writing... done
copying images... [ 23%] data:image/png;base64,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 images... [100%] subdir/../../doc-latex/.doctrees/nbsphinx/subdir_a-notebook-in-a-subdir_2_0.png                                                                                                    
copying TeX support files...
copying additional files... references.bib
done
build succeeded, 8 warnings.

The LaTeX files are in doc-latex.
Run 'make' in that directory to run these through (pdf)latex
(use `make latexpdf' here to do that automatically).
make: Entering directory '/tmp/pluto/doc-latex'
latexmk -pdf -dvi- -ps-  'nbsphinx.tex'
Latexmk: This is Latexmk, John Collins, 18 June 2019, version: 4.65.
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': The following rules & subrules became out-of-date:
      'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex   -recorder  "nbsphinx.tex"'
------------
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./nbsphinx.tex
LaTeX2e <2018-12-01>
(./sphinxhowto.cls
Document Class: sphinxhowto 2018/12/22 v1.8.3 Document class (Sphinx howto)
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/cmap/cmap.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def)<<t1.cmap>>)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def)
(/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def))))
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fncychap/fncychap.sty) (./sphinx.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def)))
(/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.dfu)))
(/usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tabulary/tabulary.sty
(/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty))
(/usr/share/texlive/texmf-dist/tex/latex/tools/longtable.sty)
(/usr/share/texlive/texmf-dist/tex/latex/varwidth/varwidth.sty)
(./sphinxmulticell.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/makeidx.sty)
(/usr/share/texlive/texmf-dist/tex/latex/framed/framed.sty)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v3.2a <2019/01/15> (tvz)) (./footnotehyper-sphinx.sty)
 (/usr/share/texlive/texmf-dist/tex/latex/float/float.sty)
(/usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/parskip/parskip.sty
(/usr/share/texlive/texmf-dist/tex/latex/parskip/parskip-2001-04-09.sty))
(/usr/share/texlive/texmf-dist/tex/latex/base/alltt.sty)
(/usr/share/texlive/texmf-dist/tex/latex/upquote/upquote.sty)
(/usr/share/texlive/texmf-dist/tex/latex/capt-of/capt-of.sty)
(/usr/share/texlive/texmf-dist/tex/latex/needspace/needspace.sty)
(./sphinxhighlight.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)))))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/hypcap.sty)
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/mathpazo.sty)
(/usr/share/texlive/texmf-dist/tex/latex/booktabs/booktabs.sty)
Writing index file nbsphinx.idx
(./nbsphinx.aux) (/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1pplj.fd)
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1pplx.fd)<<ot1.cmap>>
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/omlzplm.fd)<<oml.cmap>>
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/omszplm.fd)<<oms.cmap>>
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/omxzplm.fd)<<omx.cmap>>
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1zplm.fd)

LaTeX Font Warning: Font shape `T1/lmtt/m/n' undefined
(Font)              using `T1/cmr/m/n' instead on input line 224.

LaTeX Font Warning: Font shape `TS1/lmtt/m/n' undefined
(Font)              using `TS1/cmr/m/n' instead
(Font)              for symbol `textquotesingle' on input line 1.

LaTeX Warning: Hyper reference `a-normal-rst-file::doc' on page 1 undefined on 
input line 269.

LaTeX Warning: Reference `a-normal-rst-file::doc' on page 1 undefined on input 
line 269.

! LaTeX Error: Unknown graphics extension: .svg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.292 ...54518f516c4c0bc19d1ae86e01/version}.svg}}
                                                  %^^M
? 
! LaTeX Error: Unknown graphics extension: .svg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.292 ...54518f516c4c0bc19d1ae86e01/version}.svg}}
                                                  %^^M
? [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]

! LaTeX Error: Unknown graphics extension: .svg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.314 ...a8456b3d03b8794cac/python:nbsphinx}.svg}}
                                                  %^^M
? 
! LaTeX Error: Unknown graphics extension: .svg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.314 ...a8456b3d03b8794cac/python:nbsphinx}.svg}}
                                                  %^^M
? 

! LaTeX Error: Unknown graphics extension: .svg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.320 ...0f624ad932d738641355d1e52/nbsphinx}.svg}}
                                                  %^^M
? g^C! Interruption.
make: *** Deleting file 'nbsphinx.pdf'
\GenericError  ...                                
                                                  \endgroup 
l.320 ...0f624ad932d738641355d1e52/nbsphinx}.svg}}
                                                  %^^M
? 
! LaTeX Error: Unknown graphics extension: .svg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.320 ...0f624ad932d738641355d1e52/nbsphinx}.svg}}
                                                  %^^M
? 
! Emergency stop.
 ...                                              

l.320 ...0f624ad932d738641355d1e52/nbsphinx}.svg}}
                                                  %^^M
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on nbsphinx.log.
=== TeX engine is 'pdfTeX'
Latexmk: Index file 'nbsphinx.idx' was written
Latexmk: List of undefined refs and citations:
  Reference `a-normal-rst-file::doc' on page 1 undefined on input line 269
Latexmk: Summary of warnings from last run of (pdf)latex:
  Latex failed to resolve 1 reference(s)
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 0.0078125
      Refer to 'nbsphinx.log' for details
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.
make: *** [Makefile:33: nbsphinx.pdf] Error 12
LocutusOfBorg commented 5 years ago

this is the new package I created https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/locutusofborg-ppa/+build/17757941

Installing stuff in

/usr/lib/python3/dist-packages
/usr/lib/python3/dist-packages/sphinxcontrib
/usr/lib/python3/dist-packages/sphinxcontrib/inkscapeconverter.py
/usr/lib/python3/dist-packages/sphinxcontrib/rsvgconverter.py
/usr/lib/python3/dist-packages/sphinxcontrib_svg2pdfconverter-0.1.0-nspkg.pth
/usr/lib/python3/dist-packages/sphinxcontrib_svg2pdfconverter-0.1.0.egg-info
/usr/lib/python3/dist-packages/sphinxcontrib_svg2pdfconverter-0.1.0.egg-info/not-zip-safe
/usr/lib/python3/dist-packages/sphinxcontrib_svg2pdfconverter-0.1.0.egg-info/requires.txt
/usr/lib/python3/dist-packages/sphinxcontrib_svg2pdfconverter-0.1.0.egg-info/PKG-INFO
/usr/lib/python3/dist-packages/sphinxcontrib_svg2pdfconverter-0.1.0.egg-info/dependency_links.txt
/usr/lib/python3/dist-packages/sphinxcontrib_svg2pdfconverter-0.1.0.egg-info/top_level.txt
/usr/lib/python3/dist-packages/sphinxcontrib_svg2pdfconverter-0.1.0.egg-info/namespace_packages.txt

In fact now the nbsphinx build is successful, while before sphinx was complaining about missing svg2pdfconverter module

Running Sphinx v1.8.5

Extension error:
Could not import extension sphinxcontrib.rsvgconverter (exception: No module named 'sphinxcontrib.rsvgconverter')

So, it seems like I packaged it correctly, but something is still not working

mgeier commented 5 years ago

Are you sure you are using the master version of nbsphinx?

Your error messages mentionhttps://badge.fury.io/py/nbsphinx.svg, which should instead be https://badge.fury.io/py/nbsphinx.png.

LocutusOfBorg commented 5 years ago

Are you sure you are using the master version of nbsphinx?

not at all, I'm using 0.4.2 + PR #319 :)

Your error messages mentionhttps://badge.fury.io/py/nbsphinx.svg, which should instead be https://badge.fury.io/py/nbsphinx.png.

indeed, because after the build process, patches are unapplied, so during autopkgtest I was using the old code...

sorry for the trouble, I'll fix it up