<?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: Are wFastCGI &amp; Python API compatible? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/are-wfastcgi-python-api-compatible/m-p/1132797#M63479</link>
    <description>&lt;P&gt;Hi Victor,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have the same issue, but the arcgis.mapping&amp;nbsp; WebMap()&amp;nbsp; class has dependancies to ipython.&amp;nbsp; Any other ideas for how to interact with a webmap through wfastcgi and the api?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jan 2022 10:42:05 GMT</pubDate>
    <dc:creator>LukeWebb</dc:creator>
    <dc:date>2022-01-12T10:42:05Z</dc:date>
    <item>
      <title>Are wFastCGI &amp; Python API compatible?</title>
      <link>https://community.esri.com/t5/python-questions/are-wfastcgi-python-api-compatible/m-p/76577#M6214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to write a web service that gets data from ArcGIS Portal, even though that might seem redundant. I'm using IIS, wFastCGI, Flask, and the ArcGIS API for Python. The service runs fine on localhost using Flask's web server, but it fails when I run it with IIS and wFastCGI. When I import arcgis, it imports ipywidgets, which imports IPython. IPython tries to do something with the input stream (stdin), but wFastCGI has already hijacked the input stream for its own purposes. Here's how it ends:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;...\lib\site-packages\IPython\utils\io.py", line 81, in closed&lt;BR /&gt;&amp;nbsp; return self.stream.closed&lt;BR /&gt;ValueError: underlying buffer has been detached&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt; In other words, wFastCGI appears to be incompatible with IPython, which makes wFastCGI incompatible with the ArcGIS API for Python. One of the frustrating things about this is that I don't&amp;nbsp;need IPython, but I can't avoid importing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apparently at least&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/message/938922-import-arcgis-in-flask-with-fastcgi-in-iis"&gt;one person&lt;/A&gt;&amp;nbsp;has gotten something similar to work. Is it possible for wFastCGI and the Python API to coexist?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:47:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/are-wfastcgi-python-api-compatible/m-p/76577#M6214</guid>
      <dc:creator>JasonWise1</dc:creator>
      <dc:date>2020-09-28T20:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Are wFastCGI &amp; Python API compatible?</title>
      <link>https://community.esri.com/t5/python-questions/are-wfastcgi-python-api-compatible/m-p/76578#M6215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/150390"&gt;Jason Wise&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can uninstall ipython;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Workaround is to run pip uninstall ipython&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error I had was slightly different though,&lt;/P&gt;&lt;P&gt;After importing arcgis,&amp;nbsp;I encountered the error (Underlying buffer detached).&lt;/P&gt;&lt;DIV class="" style="color: #172b4d; background-color: #ffffff; margin: 1.143rem 0px 0px;"&gt;&lt;SPAN style="color: #172b4d; background: #f4f5f7; font-size: 12px;"&gt;&lt;CODE style="color: #8993a4; background-color: #ebecf0; font-size: 14px;"&gt;&lt;SPAN class=""&gt;1 &lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE style="font-size: 12px;"&gt;ValueError: underlying buffer has been detached&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P data-renderer-start-pos="4486" style="color: #172b4d; background-color: #ffffff; font-size: 16px; margin: 1.143rem 0px 0px;"&gt;There were several other issues I encountered. The other one was the wrong user environment which I had to manually change in code. See my documentation attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2020 23:59:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/are-wfastcgi-python-api-compatible/m-p/76578#M6215</guid>
      <dc:creator>VictorTey</dc:creator>
      <dc:date>2020-09-28T23:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Are wFastCGI &amp; Python API compatible?</title>
      <link>https://community.esri.com/t5/python-questions/are-wfastcgi-python-api-compatible/m-p/76579#M6216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, thanks! I thought uninstalling IPython would just cause an import error, but it didn't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I can get back to working on the various authentication problems. Thanks for the PDF! I wrote something similar about setting up Flask with IIS, which worked until I added ArcGIS to the mix. I'll read yours and add to mine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:29:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/are-wfastcgi-python-api-compatible/m-p/76579#M6216</guid>
      <dc:creator>JasonWise1</dc:creator>
      <dc:date>2020-09-29T14:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Are wFastCGI &amp; Python API compatible?</title>
      <link>https://community.esri.com/t5/python-questions/are-wfastcgi-python-api-compatible/m-p/1132797#M63479</link>
      <description>&lt;P&gt;Hi Victor,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have the same issue, but the arcgis.mapping&amp;nbsp; WebMap()&amp;nbsp; class has dependancies to ipython.&amp;nbsp; Any other ideas for how to interact with a webmap through wfastcgi and the api?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 10:42:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/are-wfastcgi-python-api-compatible/m-p/1132797#M63479</guid>
      <dc:creator>LukeWebb</dc:creator>
      <dc:date>2022-01-12T10:42:05Z</dc:date>
    </item>
  </channel>
</rss>

