Re: Python 3.4 StandardError problem

Guenter Milde <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
On 2015-06-02, Vladimir Prus wrote:
> Hi,

> I'm trying to use docutils on Windows, with Python 3.4, and I get an
> error like this:

> Traceback (most recent call last):
>    File "C:/Users/Vladimir/Local/docutils-0.12/tools/rst2html.py", line 17, in <module>
>      from docutils.core import publish_cmdline, default_description
>    File "C:\Users\Vladimir\Local\docutils-0.12\docutils\__init__.py", line 68, in <module>
>      class ApplicationError(StandardError):
> NameError: name 'StandardError' is not defined

It looks like you are trying to use the Python 2 version with Python 3.

The Py3 code has 

  class ApplicationError(Exception):
  
on line 68 of docutils/__init__.py


> Is there anything I'm doing wrong, or shall I use earlier version of
> Python, or is it possible to fix this problem?

To use Docutils with Python 3, you need to install it:

* unpack and call setup.py with a py3 version, or
* use pip to download and install a pre-build "Wheel" from the Pypi.

See also http://docutils.sourceforge.net/README.html#python-3-compatibility

Günter


------------------------------------------------------------------------------
_______________________________________________
Docutils-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.