[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-10 Thread Nikita Pchelin
Nikita Pchelin nikita.pche...@gmail.com added the comment: (note these aren't threads, but processes) Fair enough, I should be more careful with terminology. Ok, can you try to move the getLogger call from _Producer.__init__ to, _Producer.run?, (same for _Consumer) Yes, that seems to work

[issue13569] Loggers cannot be pickled

2011-12-10 Thread Nikita Pchelin
Nikita Pchelin nikita.pche...@gmail.com added the comment: Fair enough. Thanks for help with investigating this issue! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13569

[issue13569] Loggers cannot be pickled

2011-12-10 Thread Nikita Pchelin
Nikita Pchelin nikita.pche...@gmail.com added the comment: Here is a link for example in question: https://github.com/jango/calculon/blob/master/calculon/calculon.py Previously, I would pass logger instance from Calculon class to _Producer and _Consumer classes. In the current revision, I

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-09 Thread Nikita Pchelin
New submission from Nikita Pchelin nikita.pche...@gmail.com: I've wrote a little application that uses multiprocessing module: https://github.com/jango/PC/blob/master/pc/pc-example.py When I run it in my Linux setup, I get the expected output (Python 2.7.1+): 2011-12-09 14:16:29,014 Started

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-09 Thread Nikita Pchelin
Nikita Pchelin nikita.pche...@gmail.com added the comment: I am not sending locks explicetly (i.e. I am not using locks), but I do pass a Queue object from PC instance to _Consumer and _Producer instances that get/put values from/to the queue -- this is done deliberately. 2011/12/9 Antoine

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-09 Thread Nikita Pchelin
Nikita Pchelin nikita.pche...@gmail.com added the comment: It's multiprocessing Queue: from multiprocessing import Process, Queue, Event -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13569

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-09 Thread Nikita Pchelin
Nikita Pchelin nikita.pche...@gmail.com added the comment: Hi Antoine, * If I don't pass a logger and do print statements instead, works like a charm. * If I getLogger() in the child instead, example fails with the same trace. However, according to this ( http://docs.python.org/library

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-09 Thread Nikita Pchelin
Nikita Pchelin nikita.pche...@gmail.com added the comment: Are you sure you don't store the logger in your process' __init__ method? The __init__ method is called in the parent and the process instance is transfered to the child when you call start() on the process. To make sure we