[New-bugs-announce] [issue29194] importlib reload fails for module supplied as argument to command line

John Lehmann report at bugs.python.org
Sat Jan 7 07:02:13 EST 2017


New submission from John Lehmann:

Modules that have been loaded as an argument to the command line cannot be reloaded using importlib.reload.

For example with the attached file:

  $ python reloader.py
  Traceback (most recent call last):
    File "reloader.py", line 31, in <module>
      reload_module("__main__")
    File "reloader.py", line 28, in reload_module
      importlib.reload(module)
    File "/usr/local/var/pyenv/versions/3.5.2/lib/python3.5/importlib/__init__.py", line 166, in reload
      _bootstrap._exec(spec, module)
    File "<frozen importlib._bootstrap>", line 607, in _exec
  AttributeError: 'NoneType' object has no attribute 'name'

----------
components: Library (Lib)
files: reloader.py
messages: 284910
nosy: j1o1h1n
priority: normal
severity: normal
status: open
title: importlib reload fails for module supplied as argument to command line
versions: Python 3.5
Added file: http://bugs.python.org/file46191/reloader.py

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


More information about the New-bugs-announce mailing list