cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
IceBreaker
Level I

Python send() command is not working

Hi All, 

I am trying to test that my computer is able to run JSL scripts that use Python, I found two pieces of codes in the JMP help and I ran them using JMP 15. The following piece of code is working fine, It includes the python submit().

 

Names Default To Here( 1 );
Python Init();
Python Submit( "\[
basket = ['apple', 'orange', 'pear']
print(basket)
print(basket[0])
print(basket[1])
]\" );
Python Term();

 

However, the following piece of code did not work. The code was supposed to print the value of the variables, x, s and M. However, it printed the statement (print (x)) , (print(s)) and (print(M)) instead. it looks like the python send() command is not working. I hope you can help figure it out. This is the code:

Names Default To Here( 1 );
Python Init();
X = 1;
Python Send( X );
S = "Report Title";
Python Send( S );
M = [1 2 3, 4 5 6, 7 8 9];
Python Send( M );
Python Submit( "\[
print(X)
print(S)
print(M)

]\" );
Python Term();

 

and this is the output:

 

1.0
Report Title

/**********/

print(X)
print(S)
print(M)

/**********/

0

 

 

Thank you in advance

 

 

7 REPLIES 7
txnelson
Super User

Re: Python send() command is not working

Running Windows 10, with JMP 16, I get the following results when running your sample code

1.0
Report Title
[[1. 2. 3.]
 [4. 5. 6.]
 [7. 8. 9.]]

0
Jim
jthi
Super User

Re: Python send() command is not working

Do you have all required libraries installed JMP Help - Install Python .

 

Which version of JMP15 are you using? I think JMP15.2 or something broke Python Send() but it was fixed in 15.2.1.

Release Notes for JMP 15.2.1 

Using Python Send() to send data tables to JMP no longer generates an unsupported data type error

-Jarmo
IceBreaker
Level I

Re: Python send() command is not working

No, I have not installed the libraries in the JMP help. I am using JMP 15.1.0. I will install them and try it again. 

Thank you for helping out.

 

Re: Python send() command is not working

You need to have numpy installed, as the get/send() code for arrays depends on numpy.

 

There was a single version of JMP that slipped through that broke the send(). Code was added to support passing of bool and None, but a single missing '}'  broke a chain of if then else logic.  All the command processing for send() below that point broke. If that's the case with your version, updating to a newer version is the solution.

vince_faller
Super User (Alumni)

Re: Python send() command is not working

So JMP 15.2 shouldn't be used for python processing?

Vince Faller - Predictum

Re: Python send() command is not working

If you need full functionality of the send() function then that's correct, avoid 15.2.  Use either 15.1 or 15.2.1 and newer.

moeckelr
Level II

Re: Python send() command is not working

Dear all,

 

it seems that I have the same problem - Submit with Python (3.11) in generall works (including pandas & numpy) but Send is not passing an object. I'm using JMP Pro 17.0.

When using JMP Pro 16.2 its working nicely. Do you know how to fix this issue with JMP 17?

 

Thanks in advance and best regards,

 

Robert