<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error: Python data type is not supported in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Error-Python-data-type-is-not-supported/m-p/384400#M63476</link>
    <description>&lt;P&gt;Try updating to JMP 15.2.1 as it might have fix for that issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using Python Send() to send data tables to JMP no longer generates an unsupported data type error.&lt;/P&gt;</description>
    <pubDate>Wed, 12 May 2021 05:07:44 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-05-12T05:07:44Z</dc:date>
    <item>
      <title>Error: Python data type is not supported</title>
      <link>https://community.jmp.com/t5/Discussions/Error-Python-data-type-is-not-supported/m-p/384289#M63468</link>
      <description>&lt;P&gt;I've had some success with the Python integration in the past but after a recent reinstall, I'm having huge problems with getting it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Configuration:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I'm on &lt;LI-PRODUCT title="JMP Pro" id="jmppro"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;15.2&amp;nbsp;and Python 3.6.&lt;/LI&gt;&lt;LI&gt;Just to make sure the python installation is clean, I've uninstalled it and reinstalled it. No modules other than the needed ones are installed:&lt;UL&gt;&lt;LI&gt;numpy, scipy, pandas, matplotlib, pyqt5 and their dependencies:&lt;UL&gt;&lt;LI&gt;&lt;PRE&gt;&amp;gt;&amp;gt; py -3.6 -m pip freeze
cycler==0.10.0&lt;BR /&gt;kiwisolver==1.3.1&lt;BR /&gt;matplotlib==3.3.4&lt;BR /&gt;numpy==1.19.5&lt;BR /&gt;pandas==1.1.5&lt;BR /&gt;Pillow==8.2.0&lt;BR /&gt;pyparsing==2.4.7&lt;BR /&gt;PyQt5==5.15.4&lt;BR /&gt;PyQt5-Qt5==5.15.2&lt;BR /&gt;PyQt5-sip==12.9.0&lt;BR /&gt;python-dateutil==2.8.1&lt;BR /&gt;pytz==2021.1&lt;BR /&gt;scipy==1.5.4&lt;BR /&gt;six==1.16.0&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Python Init();
Python Submit( "import sys" );
Python Submit( "print(sys.version)" );
Python Term();


3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)]

0&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;With this setup I can execute:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Python Init();
x = 5;
Python Send( x );
Python Submit( "print(x)" );

Python Submit(
"\[
basket = ['apple', 'orange', 'pear']
print(basket)
]\"
);
Python Term();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;As expected, I see &lt;STRONG&gt;5.0&lt;/STRONG&gt; in the log and a &lt;STRONG&gt;0&lt;/STRONG&gt; for Python Term():&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;5.0
&lt;BR /&gt;['apple', 'orange', 'pear']&lt;BR /&gt;
0&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, if I push anything more than a simple number, string, or list, I get an error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Python Init();
x = [5];
Python Send( x );
Python Submit( "print(x)" );
Python Term();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This results in the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Python data type is not supported.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Almost none of the Scripting Index examples work. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Python Init();
a = "abcdef";
d = 3.141;
v = [9 8 7, 6 5 4, 3 2 1];
m = [1 2 3, 4 5 6, 7 8 9];
ml = Python Execute(
	{v, m, a, d},
	{x, z, a, d},
	"\[
import numpy as np
a = np.multiply(v, m) # matrix product
d = np.divide(v, m) # matrix division
z = np.multiply(m, np.linalg.inv(v)) # m * inv(v) called Left division
x = np.multiply(np.linalg.inv(m), v) # inv(m) * v called right division
]\"
);
Show( v, m, ml, x, z, a, d );
Python Term();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Python data type is not supported.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there something I'm missing? JMP appears to be finding and sending data to Python just fine so it's not difficulties in finding the Python installation but for some reason, anything that's more than a simple python primitive don't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 20:44:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-Python-data-type-is-not-supported/m-p/384289#M63468</guid>
      <dc:creator>burakbagdatli</dc:creator>
      <dc:date>2023-06-10T20:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Python data type is not supported</title>
      <link>https://community.jmp.com/t5/Discussions/Error-Python-data-type-is-not-supported/m-p/384341#M63469</link>
      <description>&lt;P&gt;Update:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the problem is isolated on &lt;STRONG&gt;Python Send&lt;/STRONG&gt; or &lt;STRONG&gt;Python Execute&lt;/STRONG&gt;&amp;nbsp;as JMP is trying to send the data to python. Creating the data in python and getting it into JMP works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Python Init();
Python Submit("\[

df = _JMPpd.DataFrame({"Col1": [1, 2, 3],
	                   "Col2": [4, 5, 6]})
print(df)

x = _JMPnp.array([1,2,3])
print(x)
	
]\");

dt = Python Get(df);
Show(dt);
dt &amp;lt;&amp;lt; New Data View;

x = Python Get(x);
Show(x);

Python Term();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And it works just fine:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;   Col1  Col2
0     1     4
1     2     5
2     3     6
[1 2 3]

dt = DataTable("df");
x = [1 2 3];
0&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="image.png" style="width: 333px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32759i15AD8C001025532B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 18:40:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-Python-data-type-is-not-supported/m-p/384341#M63469</guid>
      <dc:creator>burakbagdatli</dc:creator>
      <dc:date>2021-05-11T18:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Python data type is not supported</title>
      <link>https://community.jmp.com/t5/Discussions/Error-Python-data-type-is-not-supported/m-p/384400#M63476</link>
      <description>&lt;P&gt;Try updating to JMP 15.2.1 as it might have fix for that issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using Python Send() to send data tables to JMP no longer generates an unsupported data type error.&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 05:07:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-Python-data-type-is-not-supported/m-p/384400#M63476</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-05-12T05:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Python data type is not supported</title>
      <link>https://community.jmp.com/t5/Discussions/Error-Python-data-type-is-not-supported/m-p/481466#M72579</link>
      <description>&lt;P&gt;In adding support for sending type bool and None, JMP 15.2 broke the send() command for any thing that followed the bool and None code, a single '}' was left out of the code. &amp;nbsp;JMP 15.2.1 fixed the send functionality. &amp;nbsp;Sorry for breakage, sometimes things slip through even with unit tests. &amp;nbsp;( now even more complete coverage )&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 15:20:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-Python-data-type-is-not-supported/m-p/481466#M72579</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2022-04-22T15:20:27Z</dc:date>
    </item>
  </channel>
</rss>

