[Numpy-discussion] Annoyance of memap rray with multiprocessing.Pool.applay_async

Robert Kern robert.kern@gmail....
Sat Apr 3 16:47:26 CDT 2010

On Sat, Apr 3, 2010 at 14:29, Nadav Horesh <nadavh@visionsense.com> wrote:
> The following script generate the following error on every loop iteration in the function average:
> Exception AttributeError: AttributeError("'NoneType' object has no attribute 'tell'",) in <bound method memmap.__del__ of memmap(xxxxxx)> ignored
> where xxxxxx is a scalar (the array sum).
> I get this error with numpy1.4 on a linux64 (dual core) machine. A winXP/Pentium4 with 2GB Ram could not run it since it explode the memory.
>  Any idea what is the origin on the error (my interset is the linux box)?

memmap instances don't pickle. Don't pass them as arguments to
apply_async() or related functions. Instead, pass the filename and
other arguments to memmap() and reconstruct the arrays in each

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list