Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#214 python 2.x import exception

closed-fixed
nobody
None
5
2012-12-27
2012-12-17
Anonymous
No

Doing: from docutils import io, nodes
Raises a fileload exception with docutils 1.0
Package installed from pip

Discussion


  • Anonymous
    2012-12-17

    Hi,

    we've been experiencing that one with docutils 0.10, too.

    ~ $ /tmp/testdocenv/bin/python
    Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17)
    [GCC 4.6.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from docutils import io
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/tmp/testdocenv/local/lib/python2.7/site-packages/docutils/io.py", line 18, in <module>
    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
    File "/tmp/testdocenv/local/lib/python2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>
    from docutils.io import FileOutput
    ImportError: cannot import name FileOutput

    This is in a fresh fully insulated virtualenv, docutils installed via pip from pypi

    This really looks like an import loop between the 'io' and 'utils' modules.

     
  • Ned Deily
    Ned Deily
    2012-12-23

    Adding an explicit "import docutils.utils" before importing from docutils.io works around the bug.

     
  • Günter Milde
    Günter Milde
    2012-12-27

    • status: open --> closed-fixed