[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the "main" module

Brett Cannon report at bugs.python.org
Tue Dec 10 21:27:32 CET 2013


Brett Cannon added the comment:

So at the bare minimum, the multiprocessing code should raise an ImportError when it can't find the spec for the module to help debug this kind of thing. Also that typo should get fixed.

Second, there is no way that 'nosetests' will ever succeed as an import since, as Oliver pointed out, it doesn't end in '.py' or any other identifiable way for a finder to know it can handle the file. So this is not a bug and simply a side-effect of how import works. The only way around it would be to symlink nosetests to nosetests.py or to somehow pre-emptively set up 'nosetests' for supported importing.

----------
assignee:  -> brett.cannon
priority: normal -> low
stage:  -> needs patch
title: multiprocessing crash with forkserver  or spawn  when run from a non ".py" ending script -> Have multiprocessing raise ImportError when spawning a process that can't find the "main" module
type: crash -> behavior

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


More information about the Python-bugs-list mailing list