I have a setting in which I send the dictionary through multiprocessing.queue and do some things with it. I was getting the unusual “dictionary size changed by repeating the error” when I did not change anything in the dictionary. Here's the trace, although this is not very useful:
Traceback (most recent call last): File "/usr/lib/python2.6/multiprocessing/queues.py", line 242, in _feed send(obj) RuntimeError: dictionary changed size during iteration
So I tried to change the dictionary to an immutable dictionary to see where it changes. Here I got the trace:
Traceback (most recent call last): File "/home/jason/src/interface_dev/jiva_interface/jiva_interface/delta.py", line 54, in main msg = self.recv() File "/home/jason/src/interface_dev/jiva_interface/jiva_interface/process/__init__.py", line 65, in recv return self.inqueue.get(timeout=timeout) File "/usr/lib/python2.6/multiprocessing/queues.py", line 91, in get res = self._recv() File "build/bdist.linux-i686/egg/pysistence/persistent_dict.py", line 22, in not_implemented_method raise NotImplementedError, 'Cannot set values in a PDict' NotImplementedError: Cannot set values in a PDict
This is a little strange because, as far as I can tell, I do nothing but get it out of the lineup. Can someone shed light on what is happening here?
source share