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 cool-RR
Recipients alexandre.vassalotti, amaury.forgeotdarc, belopolsky, cool-RR, daniel.urban, eric.araujo, exarkun, hinsen, lemburg, loewis, obamausa8, pitrou, rhettinger
Date 2011-03-02.10:35:16
SpamBayes Score 9.461132e-07
Marked as misclassified No
Message-id <1299062117.7.0.393828775351.issue9276@psf.upfronthosting.co.za>
In-reply-to
Content
Amaury:

Your example succeeds on Linux but fails on Windows:

	$ python3.2 main.py
	CALLED
	Traceback (most recent call last):
	  File "C:\Python32\Lib\pickle.py", line 679, in save_global
		klass = getattr(mod, name)
	AttributeError: 'module' object has no attribute 'foo'

	During handling of the above exception, another exception occurred:

	Traceback (most recent call last):
	  File "main.py", line 7, in <module>
		p.start(); p.join()
	  File "C:\Python32\Lib\multiprocessing\process.py", line 130, in start
		self._popen = Popen(self)
	  File "C:\Python32\Lib\multiprocessing\forking.py", line 267, in __init__
		dump(process_obj, to_child, HIGHEST_PROTOCOL)
	  File "C:\Python32\Lib\multiprocessing\forking.py", line 190, in dump
		ForkingPickler(file, protocol).dump(obj)
	  File "C:\Python32\Lib\pickle.py", line 237, in dump
		self.save(obj)
	  File "C:\Python32\Lib\pickle.py", line 344, in save
		self.save_reduce(obj=obj, *rv)
	  File "C:\Python32\Lib\pickle.py", line 432, in save_reduce
		save(state)
	  File "C:\Python32\Lib\pickle.py", line 299, in save
		f(self, obj) # Call unbound method with explicit self
	  File "C:\Python32\Lib\pickle.py", line 623, in save_dict
		self._batch_setitems(obj.items())
	  File "C:\Python32\Lib\pickle.py", line 656, in _batch_setitems
		save(v)
	  File "C:\Python32\Lib\pickle.py", line 299, in save
		f(self, obj) # Call unbound method with explicit self
	  File "C:\Python32\Lib\pickle.py", line 683, in save_global
		(obj, module, name))
	_pickle.PicklingError: Can't pickle <function foo at 0x00C4EBB8>: it's not found as mod.foo

	User@TURING ~/Desktop/temp
	$ Traceback (most recent call last):
	  File "<string>", line 1, in <module>
	  File "C:\Python32\Lib\multiprocessing\forking.py", line 370, in main
		self = load(from_parent)
	EOFError
History
Date User Action Args
2011-03-02 10:35:17cool-RRsetrecipients: + cool-RR, lemburg, loewis, rhettinger, hinsen, exarkun, amaury.forgeotdarc, belopolsky, pitrou, alexandre.vassalotti, eric.araujo, obamausa8, daniel.urban
2011-03-02 10:35:17cool-RRsetmessageid: <1299062117.7.0.393828775351.issue9276@psf.upfronthosting.co.za>
2011-03-02 10:35:17cool-RRlinkissue9276 messages
2011-03-02 10:35:16cool-RRcreate