#186 missing import of ErrorString

closed-fixed
nobody
None
5
2012-03-19
2012-03-18
No

I got this error, showing an exception when trying to report a different error:

File "/usr/local/lib/python2.7/dist-packages/docutils-0.8.1-py2.7.egg/docutils/core.py", line 162, in process_command_line
self.settings = option_parser.parse_args(argv)
File "/usr/lib/python2.7/optparse.py", line 1399, in parse_args
stop = self._process_args(largs, rargs, values)
File "/usr/lib/python2.7/optparse.py", line 1443, in _process_args
self._process_short_opts(rargs, values)
File "/usr/lib/python2.7/optparse.py", line 1550, in _process_short_opts
option.process(opt, value, values, self)
File "/usr/local/lib/python2.7/dist-packages/docutils-0.8.1-py2.7.egg/docutils/frontend.py", line 280, in process
% (opt, ErrorString(error))),
NameError: global name 'ErrorString' is not defined

pyflakes confirms that there is a missing import:

HACL zompu:~/playground/pycryptopp/pycryptopp$ pyflakes /usr/local/lib/python2.7/dist-packages/docutils-0.8.1-py2.7.egg/docutils/frontend.py
/usr/local/lib/python2.7/dist-packages/docutils-0.8.1-py2.7.egg/docutils/frontend.py:280: undefined name 'ErrorString'
/usr/local/lib/python2.7/dist-packages/docutils-0.8.1-py2.7.egg/docutils/frontend.py:584: 'pwd' imported but unused
/usr/local/lib/python2.7/dist-packages/docutils-0.8.1-py2.7.egg/docutils/frontend.py:761: undefined name 'ErrorString'

Adding the missing import reveals the error:

HACL zompu:~/playground/pycryptopp/pycryptopp$ rst2html -verbose README.ed25519.rst > README.ed25519.html
Usage
=====
rst2html [options] [<source> [<destination>]]

rst2html: error: Error in option "-e":
LookupError: setting "error_encoding": unknown encoding: "rbose"

Discussion

  • Günter Milde

    Günter Milde - 2012-03-19
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks