[issue4540] typo in a module describes utf-8 as uft-8

Amaury Forgeot d'Arc report at bugs.python.org
Fri Dec 5 01:47:50 CET 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

When enumerating all possible modules, the help system tries to import 
test.bad_coding.py :-(
I tried to catch this LookupError, but then it fail on test.badsyntax_pep3120.py, 
with a SyntaxError
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python30\lib\site.py", line 427, in __call__
    return pydoc.help(*args, **kwds)
  File "c:\python30\lib\pydoc.py", line 1675, in __call__
    self.interact()
  File "c:\python30\lib\pydoc.py", line 1693, in interact
    self.help(request)
  File "c:\python30\lib\pydoc.py", line 1711, in help
    self.listmodules(request.split()[1])
  File "c:\python30\lib\pydoc.py", line 1799, in listmodules
    apropos(key)
  File "c:\python30\lib\pydoc.py", line 1913, in apropos
    ModuleScanner().run(callback, key, onerror=onerror)
  File "c:\python30\lib\pydoc.py", line 1872, in run
    loader = importer.find_module(modname)
  File "C:\Python30\lib\pkgutil.py", line 186, in find_module
    file, filename, etc = imp.find_module(subname, path)
SyntaxError: Non-UTF-8 code starting with '\xf6' in file (null) on line 1, but n
o encoding declared; see http://python.org/dev/peps/pep-0263/ for details


[Note: I don't like the (null) as a filename...]

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4540>
_______________________________________


More information about the Python-bugs-list mailing list