[New-bugs-announce] [issue24006] Multiprocessing fails when using functions defined in interactive interpreter.

ppperry report at bugs.python.org
Sun Apr 19 19:21:01 CEST 2015


New submission from ppperry:

An AttributeError is raised when starting a new process with an object defined in the interactive interpreter
>>>def test():print "test"
>>>test()
test
>>>from threading import Thread
>>>Thread(target=test).start()
test
>>>from multiprocessing import Process
>>>Process(target=test).start()
<traceback, ending with>
File <path to python>/Lib/pickle.py, line 1126, in find_class
      klass = getattr(mod, name)
AttributeError: 'module' object has no attribute 'test'
running similar code in a file works and does not raise an error.

----------
components: Interpreter Core, Library (Lib)
messages: 241521
nosy: ppperry
priority: normal
severity: normal
status: open
title: Multiprocessing fails when using functions defined in interactive interpreter.
type: behavior
versions: Python 2.7

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


More information about the New-bugs-announce mailing list