[IPython-dev] parallel: BaseException.message has been deprecated
Ondrej Certik
ondrej at certik.cz
Wed Mar 18 23:11:52 EDT 2009
> one or more exceptions from call to method: execute
> [Engine Exception]exceptions.NameError: global name '__IPYTHON__' is not defined
> [Engine Exception]exceptions.NameError: global name '__IPYTHON__' is not defined
> [Engine Exception]exceptions.NameError: global name '__IPYTHON__' is not defined
> [Engine Exception]exceptions.NameError: global name '__IPYTHON__' is not defined
> [Engine Exception]exceptions.NameError: global name '__IPYTHON__' is not defined
> [Engine Exception]exceptions.NameError: global name '__IPYTHON__' is not defined
> [Engine Exception]exceptions.NameError: global name '__IPYTHON__' is not defined
> [Engine Exception]exceptions.NameError: global name '__IPYTHON__' is not defined
This seems to be some problem with ipython, because if I push a
function that works, e.g.:
def get_tests():
pass
#from sympy.utilities.runtests import PyTestReporter, SymPyTests
#r = PyTestReporter(verbose, tb, colors)
#t = SymPyTests(r, kw, post_mortem)
#t.add_paths(["sympy/core"])
#tests = t.collect_tests_in_file(t._tests[0])
#return tests
from IPython.kernel import client
mec = client.MultiEngineClient()
mec.reset()
ids = mec.get_ids()
mec.push_function({"get_tests": get_tests})
try:
print mec.execute("get_tests()")
except:
t, v, tr = sys.exc_info()
print t
print v
print tr
print dir(v)
v.raise_exception()
Then it prints:
[0] In [1]: get_tests()
[1] In [1]: get_tests()
[2] In [1]: get_tests()
[3] In [1]: get_tests()
[4] In [1]: get_tests()
[5] In [1]: get_tests()
[6] In [1]: get_tests()
[7] In [1]: get_tests()
But if I push the following function:
def get_tests():
pass
from sympy.utilities.runtests import PyTestReporter, SymPyTests
Then it prints the error from my previous email. The problem is
however that sympy is not in my sys.path so it should raise a regular
import error exception.
To prove my theory, here is a simple script, that fails for me:
----------
import sys
def fails():
e = 1/0
from IPython.kernel import client
mec = client.MultiEngineClient()
mec.reset()
ids = mec.get_ids()
mec.push_function({"f": fails})
try:
print mec.execute("get_tests()")
except:
t, v, tr = sys.exc_info()
print v
v.raise_exception()
-----------
I am using python2.6, since this is what is default in ubuntu now. If
you have time, I'll provide you with ssh access to my computer so that
you can debug this yourself.
I originally wanted to go for a beer tonight, but this makes me
reconsider. :) I need to get the parallel testing working soon, since
I won't have a time for this later.
Ondrej
More information about the IPython-dev
mailing list