<?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 SAS and Python - calling python library in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/SAS-and-Python-calling-python-library/m-p/787753#M1296</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;Say, I want to run the piece of python code on sas viya.&amp;nbsp; We have done the SAS and Python Configuration.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. pip install swat&lt;BR /&gt;2. import swat&lt;BR /&gt;3. import os&lt;BR /&gt;4. hostValue = os.environ.get('CASHOST')&lt;BR /&gt;portValue = os.environ.get('CASPORT')&lt;BR /&gt;passwordToken = os.environ.get('SAS_VIYA_TOKEN')&lt;BR /&gt;5. print(hostValue)&lt;BR /&gt;print(portValue)&lt;BR /&gt;print(passwordToken)&lt;BR /&gt;6. conn = swat.CAS(hostname=hostValue, port=portValue, password=passwordToken)&lt;BR /&gt;7. conn&lt;/P&gt;
&lt;P&gt;8. pip install well_profile&lt;BR /&gt;9. import well_profile as wp&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to run the following&amp;nbsp; python code, it is throwing error&amp;nbsp;&lt;/P&gt;
&lt;P&gt;well = wp.load('trajectory1.xlsx')&lt;/P&gt;
&lt;P&gt;well.plot(style={'color': 'dls', 'size' : 5}).show()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN class="ansi-red-fg"&gt;AttributeError&lt;/SPAN&gt;: 'AxesSubplot' object has no attribute 'show&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 30 Dec 2021 10:10:23 GMT</pubDate>
    <dc:creator>ngottala</dc:creator>
    <dc:date>2021-12-30T10:10:23Z</dc:date>
    <item>
      <title>SAS and Python - calling python library</title>
      <link>https://communities.sas.com/t5/SAS-Viya/SAS-and-Python-calling-python-library/m-p/787753#M1296</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;Say, I want to run the piece of python code on sas viya.&amp;nbsp; We have done the SAS and Python Configuration.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. pip install swat&lt;BR /&gt;2. import swat&lt;BR /&gt;3. import os&lt;BR /&gt;4. hostValue = os.environ.get('CASHOST')&lt;BR /&gt;portValue = os.environ.get('CASPORT')&lt;BR /&gt;passwordToken = os.environ.get('SAS_VIYA_TOKEN')&lt;BR /&gt;5. print(hostValue)&lt;BR /&gt;print(portValue)&lt;BR /&gt;print(passwordToken)&lt;BR /&gt;6. conn = swat.CAS(hostname=hostValue, port=portValue, password=passwordToken)&lt;BR /&gt;7. conn&lt;/P&gt;
&lt;P&gt;8. pip install well_profile&lt;BR /&gt;9. import well_profile as wp&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to run the following&amp;nbsp; python code, it is throwing error&amp;nbsp;&lt;/P&gt;
&lt;P&gt;well = wp.load('trajectory1.xlsx')&lt;/P&gt;
&lt;P&gt;well.plot(style={'color': 'dls', 'size' : 5}).show()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN class="ansi-red-fg"&gt;AttributeError&lt;/SPAN&gt;: 'AxesSubplot' object has no attribute 'show&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Dec 2021 10:10:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/SAS-and-Python-calling-python-library/m-p/787753#M1296</guid>
      <dc:creator>ngottala</dc:creator>
      <dc:date>2021-12-30T10:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS and Python - calling python library</title>
      <link>https://communities.sas.com/t5/SAS-Viya/SAS-and-Python-calling-python-library/m-p/788092#M1306</link>
      <description>This error seems to be coming from "well_profile" rather than anything from your CAS connection.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/pro-well-plan/well_profile" target="_blank"&gt;https://github.com/pro-well-plan/well_profile&lt;/A&gt;</description>
      <pubDate>Mon, 03 Jan 2022 13:42:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/SAS-and-Python-calling-python-library/m-p/788092#M1306</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2022-01-03T13:42:44Z</dc:date>
    </item>
  </channel>
</rss>

