[New-bugs-announce] [issue8612] multiprocessing Queue module failes to send INIConfig objects

Zaar Hai report at bugs.python.org
Tue May 4 16:17:15 CEST 2010

New submission from Zaar Hai <haizaar at gmail.com>:

I'm using INIConfig class from iniparse module(http://code.google.com/p/iniparse).
I've tried to use multiprocessing.Queue to propagate 
configuration changes between the processes. However, INIConfig instances 
have troubles being pushed through Queue objects.

I do not know whether this is a Queue or iniparse bug, so I've opened issued on both projects(http://code.google.com/p/iniparse/issues/detail?id=20). Even this is not a Queue bug, it would be great to have some advice on how this problem may be solved. Thanks.

Problem description:

Running this simple code:

from multiprocessing import Process
from multiprocessing import Queue
from iniparse import INIConfig
import time

def worker(queue):
    config = queue.get()
    print config.sec1.var1

def main():
    config = INIConfig(open("./my.conf"))
    queue = Queue()
    p = Process(target=worker, args=(queue,))

if __name__ == "__main__":

Raised this error:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.5/multiprocessing/queues.py", line 242, in _feed
TypeError: 'Undefined' object is not callable

The contents of my.conf are like this:
var1 = test1
var2 = test2

I'm using python 2.5.2 on Debian Lenny amd64 with python-multiprocessing package (http://packages.debian.org/squeeze/python-multiprocessing).

components: None
messages: 104942
nosy: Zaar.Hai
priority: normal
severity: normal
status: open
title: multiprocessing Queue module failes to send INIConfig objects
versions: Python 2.5

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list