<?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: GetParameterAsText  &amp;quot;ERROR 000735: Input Features: Value is required&amp;quot; in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213725#M16464</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have to add your script as a script tool if you want any kind of interactivity with user input, outside of command line parameters as you have already seen. If you do not add your script as a script tool, nothing will pop up asking you to choose anything, unless you design your own GUI to do so.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Nov 2011 12:32:09 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2011-11-30T12:32:09Z</dc:date>
    <item>
      <title>GetParameterAsText  &amp;quot;ERROR 000735: Input Features: Value is required&amp;quot;</title>
      <link>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213723#M16462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I cannot get this code to work. It is a simple homework assignment- I saw a similar post that I quote below but my problem is slightly different as I wrote the code as script not exported from a model :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to use the GetParameterAsText to ask the user to give input (to let them choose which featureclass they want to use) from the script. I keep getting the message : "Runtime error &amp;lt;class 'arcgisscripting.ExecuteError'&amp;gt;: ERROR 000735: Input Features: Value is required"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; I cannot get the box to come up asking the user to choose which featureclass to run the script/model on or the output file etc. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Previous poster added the script as a tool and made parameters there but I need to code them from script for this homework- the script works if I hardcode the inputs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CODE:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Purpose: Copy selected features from one feature class into&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a brand new feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import the arcpy module&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, os.path&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Input feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inFC = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Output feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outFC = arcpy.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# SQL statement to filter features. If the expression is empty,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# all features will be copied into the new feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;expression = arcpy.GetParameterAsText(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Field information to alter output fields. If the fieldInfo&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# is empty, all fields will be unaltered in the new feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fieldInfo = arcpy.GetParameterAsText(3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Make a temporary layer to hold the selected features and altered fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# The selected features are determined by the expression variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# The altered fields are determined by the fieldInfo variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management(inFC, os.path.basename(outFC), expression,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; os.path.dirname(outFC), fieldInfo)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Copy selected features and altered fields to the output feature class. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures_management(os.path.basename(outFC), outFC)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 04:18:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213723#M16462</guid>
      <dc:creator>darylejohnson</dc:creator>
      <dc:date>2011-11-30T04:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: GetParameterAsText  "ERROR 000735: Input Features: Value is required"</title>
      <link>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213724#M16463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;PS- This script works fine from the windows command prompt like so :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;C:\Python26\ArcGIS10.0&amp;gt;python c:\usr\myname\lab12\test\fc2fc.py c:\usr\myname\la&lt;BR /&gt;b10\world\world\rivers.shp c:\usr\myname\lab12\test\rivers.shp "" ""&lt;BR /&gt;&lt;BR /&gt;C:\Python26\ArcGIS10.0&amp;gt;&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 04:35:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213724#M16463</guid>
      <dc:creator>darylejohnson</dc:creator>
      <dc:date>2011-11-30T04:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: GetParameterAsText  "ERROR 000735: Input Features: Value is required"</title>
      <link>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213725#M16464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have to add your script as a script tool if you want any kind of interactivity with user input, outside of command line parameters as you have already seen. If you do not add your script as a script tool, nothing will pop up asking you to choose anything, unless you design your own GUI to do so.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 12:32:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213725#M16464</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-11-30T12:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: GetParameterAsText  "ERROR 000735: Input Features: Value is required"</title>
      <link>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213726#M16465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You should also check out &lt;/SPAN&gt;&lt;A href="http://docs.python.org/release/2.6.5/library/sys.html"&gt;sys.argv&lt;/A&gt;&lt;SPAN&gt; for user input.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 14:55:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213726#M16465</guid>
      <dc:creator>RuthEmerick</dc:creator>
      <dc:date>2011-11-30T14:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: GetParameterAsText  "ERROR 000735: Input Features: Value is required"</title>
      <link>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213727#M16466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks guys - but are you sure about that ? I have a video demo of my teaching assistant writing that code manually and running it from pythonwin and an input box pops up- I am brand new to python and arcgis so not disputing you guys but I see it happening so just wondering. Here are our homework instructions directing us to do it that way also :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Step 2: Replace Hard Coded Values With Dynamic Values&lt;BR /&gt;Replace the hard-coded values with the arcpy.GetParameterAsText() function.&lt;BR /&gt;�?� Save the FC2FC_HardCoded.py script to C:\usr\yourname\lab12\FC2FC.py.&lt;BR /&gt;import arcpy, os.path&lt;BR /&gt;�?� Modify the following variables to accept user-specified input.&lt;BR /&gt;inFC = arcpy.GetParameterAsText(0)&lt;BR /&gt;outFC = arcpy.GetParameterAsText(1)&lt;BR /&gt;expression = arcpy.GetParameterAsText(2)&lt;BR /&gt;fieldInfo = arcpy.GetParameterAsText(3)&lt;BR /&gt;�?� Save the script.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;He does this manually in the video and immediately runs the script- I will see if I can post a screen shot&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 21:11:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213727#M16466</guid>
      <dc:creator>darylejohnson</dc:creator>
      <dc:date>2011-11-30T21:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: GetParameterAsText  "ERROR 000735: Input Features: Value is required"</title>
      <link>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213728#M16467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There is no way to code a pop up window without import a gui module like tkinter. He may be using a simple run with parameters button, which is just an option in most moderately advanced python IDEs, and has nothing to do with your code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 21:35:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213728#M16467</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-11-30T21:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: GetParameterAsText  "ERROR 000735: Input Features: Value is required"</title>
      <link>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213729#M16468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks guys - but are you sure about that ? I have a video demo of my teaching assistant writing that code manually and running it from pythonwin and an input box pops up- I am brand new to python and arcgis so not disputing you guys but I see it happening so just wondering. Here are our homework instructions directing us to do it that way also :&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Step 2: Replace Hard Coded Values With Dynamic Values&lt;BR /&gt;Replace the hard-coded values with the arcpy.GetParameterAsText() function.&lt;BR /&gt;�?� Save the FC2FC_HardCoded.py script to C:\usr\yourname\lab12\FC2FC.py.&lt;BR /&gt;import arcpy, os.path&lt;BR /&gt;�?� Modify the following variables to accept user-specified input.&lt;BR /&gt;inFC = arcpy.GetParameterAsText(0)&lt;BR /&gt;outFC = arcpy.GetParameterAsText(1)&lt;BR /&gt;expression = arcpy.GetParameterAsText(2)&lt;BR /&gt;fieldInfo = arcpy.GetParameterAsText(3)&lt;BR /&gt;�?� Save the script.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;He does this manually in the video and immediately runs the script- I will see if I can post a screen shot&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PythonWin does have a popup for user input for input and raw_input--I haven't used the arcpy GetParameter functions with PythonWin, but I have used the other with it. You could try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;inFC = raw_input("Please enter parameter 0: ")
outFC = raw_input("Please enter parameter 1: ")
expression = raw_input("Please enter parameter 3: ")
fieldInfo = raw_input("Please enter parameter 4: ")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:29:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/getparameterastext-nbsp-amp-quot-error-000735/m-p/213729#M16468</guid>
      <dc:creator>RuthEmerick</dc:creator>
      <dc:date>2021-12-11T10:29:01Z</dc:date>
    </item>
  </channel>
</rss>

