[New-bugs-announce] [issue29851] importlib.reload references None object

Richard Cooper report at bugs.python.org
Sat Mar 18 20:09:56 EDT 2017


New submission from Richard Cooper:

importlib.reload doesn't work; gives an error about NoneType having no name attribute.

See attached a simple repo testcase

When run it yields the following [disappointing] result.  I'm running Python3.0.6.1 (installed from brew) on OSX 10.12.3

```
iMac:python_package_loader cooper$ python3 bug.py 
module loaded
Traceback (most recent call last):
  File "bug.py", line 14, in <module>
    importlib.reload(sys.modules[moduleName])
  File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 166, in reload
    _bootstrap._exec(spec, module)
  File "<frozen importlib._bootstrap>", line 589, in _exec
AttributeError: 'NoneType' object has no attribute 'name'
```

----------
components: Library (Lib)
files: bug.py
messages: 289834
nosy: Richard Cooper
priority: normal
severity: normal
status: open
title: importlib.reload references None object
type: crash
Added file: http://bugs.python.org/file46737/bug.py

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


More information about the New-bugs-announce mailing list