Issue343

Title Multiprocessing with ipyparallel
Priority bug Status unread
Superseder Nosy List CheeseLord
Assigned To Keywords

Created on 2016-11-23.17:17:32 by CheeseLord, last changed by CheeseLord.

Messages
msg2082 (view) Author: CheeseLord Date: 2016-11-23.17:17:32
Running the following code with Python 2.7.12 (with an ipython cluster running)
successfully writes 'AAAAA' to a file once per engine:

from ipyparallel import Client

def thing():
    with file('aaaaa.txt', 'a') as f:
        f.write('AAAAA\n')

client = Client()
dview = client.direct_view()
dview.apply_sync(thing)

Compiling with 0.5.24rc1 and running (again with a cluster running) gives the
following error:

Traceback (most recent call last):
  File "/home/cheeselord/thing.py", line 9, in <module>
    dview.apply_sync(thing)
  File
"/home/cheeselord/anaconda2/lib/python2.7/site-packages/ipyparallel/client/view.py",
line 224, in apply_sync
    return self._really_apply(f, args, kwargs, block=True)
  File "<decorator-gen-127>", line 2, in _really_apply
  File
"/home/cheeselord/anaconda2/lib/python2.7/site-packages/ipyparallel/client/view.py",
line 50, in sync_results
    ret = f(self, *args, **kwargs)
  File "<decorator-gen-126>", line 2, in _really_apply
  File
"/home/cheeselord/anaconda2/lib/python2.7/site-packages/ipyparallel/client/view.py",
line 35, in save_ids
    ret = f(self, *args, **kwargs)
  File
"/home/cheeselord/anaconda2/lib/python2.7/site-packages/ipyparallel/client/view.py",
line 568, in _really_apply
    return ar.get()
  File
"/home/cheeselord/anaconda2/lib/python2.7/site-packages/ipyparallel/client/asyncresult.py",
line 166, in get
    raise self.exception()
ipyparallel.error.CompositeError: one or more exceptions from call to method: thing
[0:apply]: AttributeError: 'DummyMod' object has no attribute 'thing'
[1:apply]: AttributeError: 'DummyMod' object has no attribute 'thing'
[2:apply]: AttributeError: 'DummyMod' object has no attribute 'thing'
[3:apply]: AttributeError: 'DummyMod' object has no attribute 'thing'
.... 8 more exceptions ...
History
Date User Action Args
2016-11-23 17:17:32CheeseLordcreate