Error while generating the documentation

Asked by Nikola on 2009-01-22

I get the following error, while trying to generate the documentation with ./playground docu

...
Generating C++ examples for /home/nirangor/project/myOpenWNS/tests/system/wifimac-tests
Generating Python examples for /home/nirangor/project/myOpenWNS/tests/system/wifimac-tests
Cleaning...
rm -rf buildDevelopersGuide/*
rm -rf buildUsersGuide/*
Generating HTML Developers Guide
mkdir -p buildDevelopersGuide/html buildDevelopersGuide/doctrees
PYTHONPATH=$PYTHONPATH:./:./toolchain ./toolchain/sphinx-build -b html -d buildDevelopersGuide/doctrees developersGuide buildDevelopersGuide/html
Traceback (most recent call last):
  File "./toolchain/sphinx-build", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
make: *** [html] Error 1

There were errors during processing of documentation

I get the example experiments for example in wifimac-tests, but there should also be some tutorials in sandbox/default/doc? There I have only a dir api, full with *.htm files. Shouldn't there be also some tutorials, e.g. regarding WiFiMAC? Are they located somewhere else or are they missing due to the error?

Question information

Language:
English Edit question
Status:
Solved
For:
openWNS-Documentation Edit question
Assignee:
No assignee Edit question
Solved by:
Nikola
Solved:
2009-01-27
Last query:
2009-01-27
Last reply:
2009-01-26

Dear Nikola,

they are missing because of this error. We use Sphinx to build the users and developers manual. I have included Sphinx within the documentation project for convenience reasons. Unfortunately it seems that you need to install the package python-setuptools in order to make that work. The pkg_resources module is part of this package.

Can you please file a bug for this and I will help to make this work out of the box. Or if this does not work I will at least include the package python-setuptools in the official requirements.

For now you can download the latest official (main line) documents here:

http://www.openwns.org/Wiki/Documentation

Both the users manual and the developers manual are available for download as PDF or for online reading in HTML format.

Best Regards,
  Daniel

ImportError tells you Python is missing a package. Using

"apt-file search pkg_resources" tells you the missing file is located in the package "python-pkg-resources"
"apt-get install python-pkg-resources" therefore solves the problem.

You might need to do "apt-get install apt-file" first

Nikola (nkz) said : #3

Hello!

Thank you all for the help. python-pkg-resources solved the problem but only a new one to show up:

...
! LaTeX Error: Missing \begin{document}.

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

l.278 {\py@TitleColor\thesubsubsection
                                                  }{0.5em}{\py@TitleColor}{\...

?
! Undefined control sequence.
l.279 \titleformat
                  {\paragraph}{\large\py@HeaderFamily}%
?
! Argument of \@xdblarg has an extra }.
<inserted text>
                \par
l.279 \titleformat{\paragraph}
                              {\large\py@HeaderFamily}%
?

! LaTeX Error: Missing \begin{document}.

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

l.280 {\py@TitleColor}{0
                                    em}{\py@TitleColor}{\py@NormalColor}
?

Obviously something is going wrong with LaTeX. I have the package texlive-latex-base installed, but maybe I need also something else?

After pressing the return key, I get:
) (/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def)
(/etc/texmf/tex/latex/config/hyperref.cfg)

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

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

Enter file name:

Once again return:

LaTeX Warning: You have requested, on input line 2231, version
               `2006/08/17' of package kvoptions,
               but only version
               `'
               is available.

! Undefined control sequence.
l.2238 \ProcessKeyvalOptions
                            {Hyp}
?

and so on and so on...

Any ideas?

@Daniel
I submitted a bug. Hope it is fine like that.
Should I add the new error message also to the bug report I posted or should I post another?

Best regards,
Nikola

Nikola,

this is weird. Please check first that Sphinx does not report any errors
during generation of the HTML and Latex Sources. Is the HTML version
generated correctly?

Can you check the generated latex wether the original error is

 LaTeX Error: Missing \begin{document}.

If Sphinx runs without problems, then you probably have an error with
your latex installation. On Ubuntu I have installed the following packages

texlive-latex-base
texlive-latex-extra
texlive-latex-recommended

Thanks for your support,
  Daniel

Nikola wrote:
> Question #58397 on openWNS-Documentation changed:
> https://answers.launchpad.net/openwns-documentation/+question/58397
>
> Status: Answered => Open
>
> Nikola is still having a problem:
> Hello!
>
> Thank you all for the help. python-pkg-resources solved the problem but
> only a new one to show up:
>
> ...
> ! LaTeX Error: Missing \begin{document}.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type H <return> for immediate help.
> ...
>
> l.278 {\py@TitleColor\thesubsubsection
> }{0.5em}{\py@TitleColor}{\...
>
> ?
> ! Undefined control sequence.
> l.279 \titleformat
> {\paragraph}{\large\py@HeaderFamily}%
> ?
> ! Argument of \@xdblarg has an extra }.
> <inserted text>
> \par
> l.279 \titleformat{\paragraph}
> {\large\py@HeaderFamily}%
> ?
>
> ! LaTeX Error: Missing \begin{document}.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type H <return> for immediate help.
> ...
>
> l.280 {\py@TitleColor}{0
> em}{\py@TitleColor}{\py@NormalColor}
> ?
>
>
> Obviously something is going wrong with LaTeX. I have the package texlive-latex-base installed, but maybe I need also something else?
>
> After pressing the return key, I get:
> ) (/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
> (/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def)
> (/etc/texmf/tex/latex/config/hyperref.cfg)
>
> ! LaTeX Error: File `kvoptions.sty' not found.
>
> Type X to quit or <RETURN> to proceed,
> or enter new name. (Default extension: sty)
>
> Enter file name:
>
>
> Once again return:
>
>
> LaTeX Warning: You have requested, on input line 2231, version
> `2006/08/17' of package kvoptions,
> but only version
> `'
> is available.
>
> ! Undefined control sequence.
> l.2238 \ProcessKeyvalOptions
> {Hyp}
> ?
>
> and so on and so on...
>
>
> Any ideas?
>
> @Daniel
> I submitted a bug. Hope it is fine like that.
> Should I add the new error message also to the bug report I posted or should I post another?
>
> Best regards,
> Nikola
>
>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nikola,

this is weird. Please check first that Sphinx does not report any errors
during generation of the HTML and Latex Sources. Is the HTML version
generated correctly?

Can you check the generated latex wether the original error is

 LaTeX Error: Missing \begin{document}.

If Sphinx runs without problems, then you probably have an error with
your latex installation. On Ubuntu I have installed the following packages

texlive-latex-base
texlive-latex-extra
texlive-latex-recommended

Thanks for your support,
  Daniel

Nikola wrote:
> Question #58397 on openWNS-Documentation changed:
> https://answers.launchpad.net/openwns-documentation/+question/58397
>
> Status: Answered => Open
>
> Nikola is still having a problem:
> Hello!
>
> Thank you all for the help. python-pkg-resources solved the problem but
> only a new one to show up:
>
> ...
> ! LaTeX Error: Missing \begin{document}.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type H <return> for immediate help.
> ...
>
> l.278 {\py@TitleColor\thesubsubsection
> }{0.5em}{\py@TitleColor}{\...
>
> ?
> ! Undefined control sequence.
> l.279 \titleformat
> {\paragraph}{\large\py@HeaderFamily}%
> ?
> ! Argument of \@xdblarg has an extra }.
> <inserted text>
> \par
> l.279 \titleformat{\paragraph}
> {\large\py@HeaderFamily}%
> ?
>
> ! LaTeX Error: Missing \begin{document}.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type H <return> for immediate help.
> ...
>
> l.280 {\py@TitleColor}{0
> em}{\py@TitleColor}{\py@NormalColor}
> ?
>
>
> Obviously something is going wrong with LaTeX. I have the package texlive-latex-base installed, but maybe I need also something else?
>
> After pressing the return key, I get:
> ) (/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
> (/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def)
> (/etc/texmf/tex/latex/config/hyperref.cfg)
>
> ! LaTeX Error: File `kvoptions.sty' not found.
>
> Type X to quit or <RETURN> to proceed,
> or enter new name. (Default extension: sty)
>
> Enter file name:
>
>
> Once again return:
>
>
> LaTeX Warning: You have requested, on input line 2231, version
> `2006/08/17' of package kvoptions,
> but only version
> `'
> is available.
>
> ! Undefined control sequence.
> l.2238 \ProcessKeyvalOptions
> {Hyp}
> ?
>
> and so on and so on...
>
>
> Any ideas?
>
> @Daniel
> I submitted a bug. Hope it is fine like that.
> Should I add the new error message also to the bug report I posted or should I post another?
>
> Best regards,
> Nikola
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJeaIF+63x3EYFgNkRAimrAJ0V8TVDH1RpFGdQ/iLxRktyaEjwWwCdGAYs
kR8+U+d37/O9eM25aImrP2E=
=QT1/
-----END PGP SIGNATURE-----

Nikola (nkz) said : #6

Hi,

"Please check first that Sphinx does not report any errors
during generation of the HTML and Latex Sources. Is the HTML version
generated correctly?"

How can I check these?

I additionally installed texlive-latex-extra and texlive-latex-recommended, I didn't have them.

Now I get the following:

...
resolving references...
writing... done
copying TeX support files... done
build succeeded.

Build finished; the LaTeX files are in buildDevelopersGuide/latex.
Run `make all-pdf' or `make all-ps' in that directory to run these through (pdf)latex.
pdflatex 'openWNS-DevelopersGuide.tex'
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
 %&-line parsing enabled.
entering extended mode
(./openWNS-DevelopersGuide.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
(./manual.cls
Document Class: manual 2008/10/18 Document class (Sphinx manual)
(/usr/share/texmf-texlive/tex/latex/base/report.cls
Document Class: report 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo)))
(/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
(/usr/share/texmf-texlive/tex/latex/base/utf8.def
(/usr/share/texmf-texlive/tex/latex/base/t1enc.dfu)
(/usr/share/texmf-texlive/tex/latex/base/ot1enc.dfu)
(/usr/share/texmf-texlive/tex/latex/base/omsenc.dfu)))
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
(/usr/share/texmf-texlive/tex/latex/base/t1enc.def))
(/usr/share/texmf-texlive/tex/generic/babel/babel.sty
(/usr/share/texmf-texlive/tex/generic/babel/english.ldf
(/usr/share/texmf-texlive/tex/generic/babel/babel.def)))
(/usr/share/texmf-texlive/tex/latex/psnfss/times.sty) (./fncychap.sty)
(./sphinx.sty (/usr/share/texmf-texlive/tex/latex/base/textcomp.sty
(/usr/share/texmf-texlive/tex/latex/base/ts1enc.def
(/usr/share/texmf-texlive/tex/latex/base/ts1enc.dfu)))
(/usr/share/texmf-texlive/tex/latex/fancyhdr/fancyhdr.sty)
(/usr/share/texmf-texlive/tex/latex/fancybox/fancybox.sty
Style option: `fancybox' v1.3 <2000/09/19> (tvz)
) (/usr/share/texmf-texlive/tex/latex/titlesec/titlesec.sty) (./tabulary.sty
(/usr/share/texmf-texlive/tex/latex/tools/array.sty))
(/usr/share/texmf-texlive/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texmf-texlive/tex/latex/amsmath/amstext.sty
(/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty))
(/usr/share/texmf-texlive/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texmf-texlive/tex/latex/amsmath/amsopn.sty))
(/usr/share/texmf-texlive/tex/latex/base/makeidx.sty)
(/usr/share/texmf-texlive/tex/latex/ltxmisc/framed.sty)
(/usr/share/texmf-texlive/tex/latex/graphics/color.sty
(/etc/texmf/tex/latex/config/color.cfg)
(/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def))
(/usr/share/texmf-texlive/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.6, with DG/SPQR fixes <1998/07/17> (tvz)
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
No file fancyvrb.cfg.
) (/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
(/usr/share/texmf-texlive/tex/latex/graphics/trig.sty)
(/etc/texmf/tex/latex/config/graphics.cfg)))
(/usr/share/texmf-texlive/tex/plain/misc/pdfcolor.tex))
(/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def)
(/etc/texmf/tex/latex/config/hyperref.cfg)
(/usr/share/texmf-texlive/tex/latex/oberdiek/kvoptions.sty)
Implicit mode ON; LaTeX internals redefined
(/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty))
*hyperref using default driver hpdftex*
(/usr/share/texmf-texlive/tex/latex/hyperref/hpdftex.def)
Writing index file openWNS-DevelopersGuide.idx
No file openWNS-DevelopersGuide.aux.
(/usr/share/texmf-texlive/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf-texlive/tex/latex/psnfss/t1ptm.fd)kpathsea: Running mktextfm ptmr8t
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t
This is METAFONT, Version 2.71828 (Web2C 7.5.6)

kpathsea: Running mktexmf ptmr8t
! I can't find file `ptmr8t'.
<*> ...:=ljfour; mag:=1; nonstopmode; input ptmr8t

Please type another input file name
! Emergency stop.
<*> ...:=ljfour; mag:=1; nonstopmode; input ptmr8t

Transcript written on mfput.log.
grep: ptmr8t.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t' failed to make ptmr8t.tfm.
kpathsea: Appending font creation commands to missfont.log.

! Font T1/ptm/m/n/10=ptmr8t at 10.0pt not loadable: Metric (TFM) file not found
.
<to be read again>
                   relax
l.86 \begin{document}

?

Hi Nikola,

latex complains about a font that is not available. Have you tried to install?

texlive-fonts-recommended

Maybe this helps.

BR,
  Daniel

Nikola (nkz) said : #8

Hi Daniel,

Yes, finally it works! Thank you very much.

Maybe one can add these missing packages to the requirements list, if others face the same problem again.

python-pkg-resources
texlive-latex-base
texlive-latex-extra
texlive-latex-recommended
texlive-fonts-recommended

So thanks once again!

Best regards,
Nikola