- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
Using Python Send() to send data tables to JMP no longer generates an unsupported data type error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Python send() command is not working
So JMP 15.2 shouldn't be used for python processing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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