<?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 'module' object has no attribute 'getParameterAsText' in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/module-object-has-no-attribute-getparameterastext/m-p/52450#M4154</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have just begun wrinting a script and am hitting a wall...&amp;nbsp; I get the following message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Running script ParcelBuffer...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;type 'exceptions.AttributeError'&amp;gt;: 'module' object has no attribute 'getParameterAsText'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (ParcelBuffer).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is all that is in the script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import arcpy module&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import os&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Local variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument("Current")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set variables from user input&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RequestID = arcpy.getParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dist = arcpy.getParameterAsText(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is wrong with this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Nov 2011 11:25:53 GMT</pubDate>
    <dc:creator>DaveJordan1</dc:creator>
    <dc:date>2011-11-22T11:25:53Z</dc:date>
    <item>
      <title>'module' object has no attribute 'getParameterAsText'</title>
      <link>https://community.esri.com/t5/python-questions/module-object-has-no-attribute-getparameterastext/m-p/52450#M4154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have just begun wrinting a script and am hitting a wall...&amp;nbsp; I get the following message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Running script ParcelBuffer...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;type 'exceptions.AttributeError'&amp;gt;: 'module' object has no attribute 'getParameterAsText'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (ParcelBuffer).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is all that is in the script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import arcpy module&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import os&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Local variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument("Current")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set variables from user input&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RequestID = arcpy.getParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dist = arcpy.getParameterAsText(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is wrong with this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 11:25:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/module-object-has-no-attribute-getparameterastext/m-p/52450#M4154</guid>
      <dc:creator>DaveJordan1</dc:creator>
      <dc:date>2011-11-22T11:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: 'module' object has no attribute 'getParameterAsText'</title>
      <link>https://community.esri.com/t5/python-questions/module-object-has-no-attribute-getparameterastext/m-p/52451#M4155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try a capital G.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
arcpy.GetParameterAsText(0)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:01:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/module-object-has-no-attribute-getparameterastext/m-p/52451#M4155</guid>
      <dc:creator>GeorgeNewbury</dc:creator>
      <dc:date>2021-12-10T22:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: 'module' object has no attribute 'getParameterAsText'</title>
      <link>https://community.esri.com/t5/python-questions/module-object-has-no-attribute-getparameterastext/m-p/52452#M4156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That did the trick.&amp;nbsp; Also, I was using 1 instead of 0 for the first parameter...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 13:57:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/module-object-has-no-attribute-getparameterastext/m-p/52452#M4156</guid>
      <dc:creator>DaveJordan1</dc:creator>
      <dc:date>2011-11-22T13:57:58Z</dc:date>
    </item>
  </channel>
</rss>

