[IPython-dev] using class instances with ipython1

Michael McLay michael.j.mclay@gmail....
Mon Jan 14 16:53:38 CST 2008


I just determined the problem.  The testclass module was not in the
path  of ipcontroller.

On Jan 14, 2008 5:29 PM, Michael McLay <michael.j.mclay@gmail.com> wrote:
> Is it possible to use class instances with ipython1?  I'm getting an
> import error message whenever I try to pass a list of class instances
> to engines. I've attached a test script and a module, testclass.py,
> with a simple, pickleable class defined in it. Here's the traceback:
>
> mmclay@mmclay:~/src/scratchpad$ python test_ipython.py
> [<class C 0>, <class C 1>, <class C 2>, <class C 3>, <class C 4>,
> <class C 5>, <class C 6>, <class C 7>, <class C 8>, <class C 9>]
> Traceback (most recent call last):
>   File "test_ipython.py", line 16, in <module>
>     rc.scatterAll('cs', test)
>   File "/usr/lib/python2.5/site-packages/ipython1-0.9alpha2-py2.5.egg/ipython1/kernel/multienginexmlrpc.py",
> line 808, in scatterAll
>     return self.scatter('all', key, seq, style, flatten)
>   File "/usr/lib/python2.5/site-packages/ipython1-0.9alpha2-py2.5.egg/ipython1/kernel/multienginexmlrpc.py",
> line 798, in scatter
>     localBlock, targets, key, bseq, style, flatten)
>   File "/usr/lib/python2.5/site-packages/ipython1-0.9alpha2-py2.5.egg/ipython1/kernel/multienginexmlrpc.py",
> line 390, in _executeRemoteMethod
>     result = self._unpackageResult(rawResult)
>   File "/usr/lib/python2.5/site-packages/ipython1-0.9alpha2-py2.5.egg/ipython1/kernel/multienginexmlrpc.py",
> line 399, in _unpackageResult
>     return self._returnOrRaise(result)
>   File "/usr/lib/python2.5/site-packages/ipython1-0.9alpha2-py2.5.egg/ipython1/kernel/multienginexmlrpc.py",
> line 403, in _returnOrRaise
>     result.raiseException()
>   File "/usr/lib/python2.5/site-packages/twisted/python/failure.py",
> line 259, in raiseException
>     raise self.type, self.value, self.tb
> ImportError: No module named testclass
> mmclay@mmclay:~/src/scratchpad$
>


More information about the IPython-dev mailing list