having problems getting sphinx running on debian based python3

110 views
Skip to first unread message

Bart Thate

unread,
Nov 9, 2012, 7:23:36 PM11/9/12
to sphin...@googlegroups.com
 cat /tmp/sphinx-err-ac0vl3.log
# Sphinx version: 1.1.3
# Python version: 3.2.3
# Docutils version: 0.8.1 release
# Jinja2 version: 2.6
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/cmdline.py", line 188, in main
    warningiserror, tags)
  File "/usr/lib/python3/dist-packages/sphinx/application.py", line 134, in __init__
    self._init_builder(buildername)
  File "/usr/lib/python3/dist-packages/sphinx/application.py", line 193, in _init_builder
    __import__('sphinx.builders.' + mod, None, None, [cls]), cls)
  File "/usr/lib/python3/dist-packages/sphinx/builders/html.py", line 47, in <module>
    from sphinx.writers.html import HTMLWriter, HTMLTranslator, \
  File "/usr/lib/python3/dist-packages/sphinx/writers/html.py", line 17, in <module>
    from docutils.writers.html4css1 import Writer, HTMLTranslator as BaseTranslator
  File "/usr/lib/python3/dist-packages/docutils/writers/html4css1/__init__.py", line 31, in <module>
    from docutils.math.math2html import math2html
  File "/usr/lib/python3/dist-packages/docutils/math/math2html.py", line 1211, in <module>
    import urllib.request, urllib.parse, urllib.error
  File "/usr/lib/python3.2/urllib/request.py", line 88, in <module>
    import http.client
  File "/usr/lib/python3.2/http/client.py", line 69, in <module>
    import email.parser
ImportError: No module named parser

first # apt-get install python3-docutils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-docutils is already the newest version.
python3-docutils set to manually installed.



Robert Lehmann

unread,
Nov 10, 2012, 1:38:06 AM11/10/12
to sphin...@googlegroups.com
Could you do ``python3.2 -c "import email; print email"``?  That should print the location of your email module;  my guess being that you have another module called email.py on your path that shadows the standard library's email package.

Bart Thate

unread,
Nov 10, 2012, 4:42:26 AM11/10/12
to sphin...@googlegroups.com
Thanks fo your quick reaction Robert,

something is shadowing the email module, but it is a system module. Debian seems to split stuff up in a python3 directory (mostely site-packages) and a python3.2 directory with all the lib stuff (could be other way around as well, this is how i remember seeing it)

10:25:04 tl@time:~/dev/first$ python3.2 -c "import email; print(email)"
<module 'email' from '/usr/lib/python3.2/email/__init__.py'>


When googling for this error, they mention that the excpetion i am getting is a sign of mixing python2 and 3 code somehow, but if i look a the trace it seems something different.

Ah wait i got it ;]

Adding the print to the base app showed me this:

10:40:44 tl@time:~/dev/first$ ./bin/tl-sphinx 
Running Sphinx v1.1.3
<module 'email' from '/home/tl/dev/first/tl/drivers/email/__init__.py'>

So you are right, to call a module email yourself is not a good idea.

Thnx for the help !! i can create my docs again ;]

Bart



--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group, send email to sphinx-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages