This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon, j1o1h1n, r.david.murray
Date 2017-01-07.18:22:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1483813329.64.0.0822628518305.issue29194@psf.upfronthosting.co.za>
In-reply-to
Content
The error actually makes sense when you think about the fact that the module is being passed in by filename. That means Python has no clue what values to put in for the spec because Python literally exec()'s the file contents and stuffs it into a new module name __main__. There's no fancy attempt to construct a proper module from scratch like if you had used -m which does fill in the spec. And since importlib.reload() relies entirely on the module's spec to handle reloads it simply can't handle the `__spec__ == None` case that this is triggering.

IOW use `python3 -m reloader` and it will probably work. Closing this as "not a bug".
History
Date User Action Args
2017-01-07 18:22:09brett.cannonsetrecipients: + brett.cannon, r.david.murray, j1o1h1n
2017-01-07 18:22:09brett.cannonsetmessageid: <1483813329.64.0.0822628518305.issue29194@psf.upfronthosting.co.za>
2017-01-07 18:22:09brett.cannonlinkissue29194 messages
2017-01-07 18:22:09brett.cannoncreate