Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I removed the cython code, got past the parallel issue, and now have 2 other issues.

I have a couple of function definitions that are returning an error during attach when a default value is set:

def Eval_pulse(B1_field_ev, beta_ev, phi_p_ev, Rrangerf_ev, Omega_0_ev, Cpointsrf_ev, pname_ev, Tst_ev, Amp_ev, scaler_ev = 1):

Returns: def Eval_pulse(B1_field_ev, beta_ev, phi_p_ev, Rrangerf_ev, Omega_0_ev, Cpointsrf_ev, pname_ev, Tst_ev, Amp_ev, scaler_ev = Integer(1)): NameError: name 'Integer' is not defined

If I remove the default values the code imports but when I execute the code it returns:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_7.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("I1B1bHNlIFNoYXBlIGlzIHNpbXBsZSBleHByZXNzaW9uCkJ3X2osIHBfaiwgcG1faiwgdF9qID0gRXZhbF9wdWxzZShCMV9maWVsZCwgYmV0YSwgcGhpX3AsIFJyYW5nZXJmLCBPbWVnYV8wLCBDcG9pbnRzcmYsIHBuYW1lLCBUc3QsIEFtcCwxLjAp"),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/private/var/folders/j8/d2zfx1m16zv25klkgh71rjv40000gn/T/tmpIh729o/___code___.py", line 3, in <module> exec compile(u'Bw_j, p_j, pm_j, t_j = Eval_pulse(B1_field, beta, phi_p, Rrangerf, Omega_0, Cpointsrf, pname, Tst, Amp,_sage_const_1p0 ) File "", line 1, in <module>

NameError: name 'Eval_pulse' is not defined

Eval_Pulse is defined in the file being attached.

What am I missing? The syntax and options for attached files appears to be very different from inline cope in a notebook.

Thank you for your help

Mike

I removed the cython code, got past the parallel issue, and now have 2 other issues.

I have a couple of function definitions that are returning an error during attach when a default value is set:

def Eval_pulse(B1_field_ev, beta_ev, phi_p_ev, Rrangerf_ev, Omega_0_ev, Cpointsrf_ev, pname_ev, Tst_ev, Amp_ev, scaler_ev = 1):

Returns: 1):

Returns:

def Eval_pulse(B1_field_ev, beta_ev, phi_p_ev, Rrangerf_ev, Omega_0_ev, Cpointsrf_ev, pname_ev, Tst_ev, Amp_ev, scaler_ev = Integer(1)):
NameError: name 'Integer' is not defined

defined

If I remove the default values the code imports but when I execute the code it returns:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_7.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -- -*- coding: utf-8 --\n" -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("I1B1bHNlIFNoYXBlIGlzIHNpbXBsZSBleHByZXNzaW9uCkJ3X2osIHBfaiwgcG1faiwgdF9qID0gRXZhbF9wdWxzZShCMV9maWVsZCwgYmV0YSwgcGhpX3AsIFJyYW5nZXJmLCBPbWVnYV8wLCBDcG9pbnRzcmYsIHBuYW1lLCBUc3QsIEFtcCwxLjAp"),globals())+"\n"); _support_.preparse_worksheet_cell(base64.b64decode("I1B1bHNlIFNoYXBlIGlzIHNpbXBsZSBleHByZXNzaW9uCkJ3X2osIHBfaiwgcG1faiwgdF9qID0gRXZhbF9wdWxzZShCMV9maWVsZCwgYmV0YSwgcGhpX3AsIFJyYW5nZXJmLCBPbWVnYV8wLCBDcG9pbnRzcmYsIHBuYW1lLCBUc3QsIEFtcCwxLjAp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

<module> File "/private/var/folders/j8/d2zfx1m16zv25klkgh71rjv40000gn/T/tmpIh729o/___code___.py", line 3, in <module> exec compile(u'Bw_j, p_j, pm_j, t_j = Eval_pulse(B1_field, beta, phi_p, Rrangerf, Omega_0, Cpointsrf, pname, Tst, Amp,_sage_const_1p0 ) File "", line 1, in <module>

<module> NameError: name 'Eval_pulse' is not defined

defined

Eval_Pulse is defined in the file being attached.

What am I missing? The syntax and options for attached files appears to be very different from inline cope in a notebook.

Thank you for your help

Mike