<?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 000732 when trying to use GetParameterAsText in python script tool in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106162#M8181</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Y:\BI\GIS Data\GIS Data Backup\Python Scripts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't see any underscores in the above portion... scriptname is a general indicator of potential problems, however, you will need to provide that information for confirmation... and I hope everything is locally stored, cause sometimes that raises issues with the whole unc thing... so print out the parameters, short paths, no spaces, dashes etc and if you are coding make sure you are using raw encoded filenames&lt;/P&gt;&lt;P&gt;ie r"c:\path_to_my\data.shp" &amp;nbsp; for example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Aug 2016 16:42:29 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-08-30T16:42:29Z</dc:date>
    <item>
      <title>Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106157#M8176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;I'm attempting to write code to run a buffer and drive time analysis on an XY data file and then count features from another shapefile within the drive time trade area that's created. I'm attempting to use the Spatial Join (Analysis) for the latter process. I'm currently having an error with my code at the Spatial Join part of the code. It says the dataset "false" does not exist, which is not a dataset that I'm trying to use or am even aware of. Here is the error message with the key details:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;Traceback (most recent call last):&lt;BR /&gt; File "Y:\BI\GIS Data\GIS Data Backup\Python Scripts\InternalModel_PythonScript_SingleSite.py", line 121, in &amp;lt;module&amp;gt;&lt;BR /&gt; arcpy.SpatialJoin_analysis(targetFeaturePoly, joinSpatialConvStores, outPolyCStorePoints)&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\analysis.py", line 471, in SpatialJoin&lt;BR /&gt; raise e&lt;BR /&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Join Features: Dataset false does not exist or is not supported&lt;BR /&gt;Failed to execute (SpatialJoin).&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will say, this script runs properly when I do not see the final parameter, but instead link directly to the file path in the code. It's once I try to use GetParameterAsText when the error occurs. Here is the code attached. The error is occurring in this section. When I remove the comment from line 3 and run the script directly setting that variable to the shapefile, it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;#create layers for summarize within function; pull number of c-stores within drive time polygon
joinSpatialConvStores = arcpy.GetParameterAsText(2)
#joinSpatialConvStores = r"X:\Users\Andy.Rowlands\AHR.Data\MPSI_KalibrateData\MPSI_Competition_Locations\2015Surveys\DesMoines_2015_locations.shp"
targetFeaturePoly = fcDriveTimeAppend
businessPointsString = "CStoreCount_"
outPolyCStorePoints = businessPointsString + fcLocation
arcpy.SpatialJoin_analysis(targetFeaturePoly, joinSpatialConvStores, outPolyCStorePoints)
print ("CStore Count Done")&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:27:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106157#M8176</guid>
      <dc:creator>AndrewRowlands</dc:creator>
      <dc:date>2021-12-11T06:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106158#M8177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;recently discussed,... it is your path configuration, particularly the spaces, move the source file to a path without spaces, perhaps on your local drive... should that now work, I will try to locate the path issue and what getparameterastext does when paths are non-compliant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 16:33:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106158#M8177</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-30T16:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106159#M8178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can folder names in file paths not even include underscores? Because that's what my folder path has; there are no "true" spaces.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 16:36:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106159#M8178</guid>
      <dc:creator>AndrewRowlands</dc:creator>
      <dc:date>2016-08-30T16:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106160#M8179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Dan, probably something in you paths.&amp;nbsp; Maybe the dots in this part of your path??&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class=""&gt;&lt;CODE&gt;Andy.Rowlands\AHR.Data&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 16:36:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106160#M8179</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-08-30T16:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106161#M8180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The paths for the first two parameters are as follows, and they work perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;X:\Users\Andy.Rowlands\AHR.Data\REF.Requests\August2016\DesMoines.Hickman86th&lt;/P&gt;&lt;P&gt;X:\Users\Andy.Rowlands\AHR.Data\REF.Requests\August2016\DesMoines.Hickman86th\DesMoines_Hickman_86th.csv&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 16:40:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106161#M8180</guid>
      <dc:creator>AndrewRowlands</dc:creator>
      <dc:date>2016-08-30T16:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106162#M8181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Y:\BI\GIS Data\GIS Data Backup\Python Scripts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't see any underscores in the above portion... scriptname is a general indicator of potential problems, however, you will need to provide that information for confirmation... and I hope everything is locally stored, cause sometimes that raises issues with the whole unc thing... so print out the parameters, short paths, no spaces, dashes etc and if you are coding make sure you are using raw encoded filenames&lt;/P&gt;&lt;P&gt;ie r"c:\path_to_my\data.shp" &amp;nbsp; for example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 16:42:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106162#M8181</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-30T16:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106163#M8182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Really?&lt;/EM&gt; &amp;nbsp;Here is my go at your filename as a text string&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; x &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"X:\Users\Andy.Rowlands\AHR.Data\REF.Requests\August2016\DesMoines.Hickman86th"&lt;/SPAN&gt;
 File &lt;SPAN class="string token"&gt;"&amp;lt;string&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
SyntaxError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;unicode error&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'unicodeescape'&lt;/SPAN&gt; codec can't decode bytes &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; position &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; truncated \UXXXXXXXX escape&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now that was in python 3.5... That pesky folder called users, sometimes does, sometimes doesn't get interpreted as a unicode literal. &amp;nbsp;I suspect&amp;nbsp;&lt;/P&gt;&lt;P&gt;you are using python 2.7 which cleverly masks this flawed folder location for most things.&lt;/P&gt;&lt;P&gt;As a check, try moving your files out of anything that begins with a python literal... such as \t, \n, \U, \u etc,,, there are several.&lt;/P&gt;&lt;P&gt;If X is you working folder... and you have permissions, setup a folder structure that doesn't have those issues, doesn't have periods or spaces&lt;/P&gt;&lt;P&gt;and to be sure preface with an r for raw encoding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:27:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106163#M8182</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T06:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106164#M8183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've corrected all the file paths to remove any perceived spaces, and the issue is still occurring. I don't think that was the issue as the other two GetParameter's were also pathed in similar ways. The script still works when I directly write the code linking to the file path (spaces or no spaces); it's only when I try to use a GetParameterAsText when it does not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 16:55:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106164#M8183</guid>
      <dc:creator>AndrewRowlands</dc:creator>
      <dc:date>2016-08-30T16:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106165#M8184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have a read.... this is the link I was talking about ... when getparameterastext misbehaves vs python script&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/631093-passing-arcmap-layers-to-a-python-script-inside-arctoolbox"&gt;https://community.esri.com/message/631093-passing-arcmap-layers-to-a-python-script-inside-arctoolbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Xander's comments are pertinent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 16:59:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106165#M8184</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-30T16:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106166#M8185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought that would work, but sadly, it did not. Received the same error message. One question I did have, w&lt;SPAN style="background-color: #ffffff;"&gt;ould I change GetParameterAsText(2) to GetParameter(0) or GetParameter(2)? It would still be the third parameter in total in the script, but it would be the first parameter defined by the GetParameter function (no AsText)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Any other thoughts?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 17:19:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106166#M8185</guid>
      <dc:creator>AndrewRowlands</dc:creator>
      <dc:date>2016-08-30T17:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106167#M8186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the Get.... things are numbered from zero... try not to mix and match... I will defer to &lt;A href="https://community.esri.com/people/xander_bakker"&gt;xander_bakker&lt;/A&gt; for commentary since I always use sys.argv[ ], where sys.argv[0] is the running script and your 0's are my 1's (aka, the parameters of whatever flavor are offset by 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 17:23:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106167#M8186</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-30T17:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106168#M8187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you look at the example below:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/218637_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... you see 4 parameters. To get the one called "Clipshape", you will have to use&amp;nbsp;index = 0, "Workspace" in this case will have&amp;nbsp;index = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also look at this thread that explains why it was necessary in this particular case to get the parameter as an object and not as text:&amp;nbsp;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/message/631100-re-passing-arcmap-layers-to-a-python-script-inside-arctoolbox?commentID=631100#comment-631100" title="https://community.esri.com/message/631100-re-passing-arcmap-layers-to-a-python-script-inside-arctoolbox?commentID=631100#comment-631100"&gt;https://community.esri.com/message/631100-re-passing-arcmap-layers-to-a-python-script-inside-arctoolbox?commentID=631100#co…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 17:59:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106168#M8187</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2016-08-30T17:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106169#M8188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, that makes sense and I've set up my GetParameters with the proper setup and with the correct order. However, still having an issue with that final GetParameter running as an error message. Here's the code. Line 3 is what I'm putting as the parameter in line 2, and it's failing. However, if I&amp;nbsp;remove the comment from line 3 and run the script that way with no final GetParameter, it's still running fine.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;#create layers for summarize within function; pull number of c-stores within drive time polygon
joinSpatialConvStores = arcpy.GetParameter(2)
#joinSpatialConvStores = r"Y:\BI\KalibrateCompetitionLocations\MPSICompetitionLocations\2015Surveys\DesMoines_2015_locations.shp"
targetFeaturePoly = fcDriveTimeAppend
businessPointsString = "CStoreCount_"
outPolyCStorePoints = businessPointsString + fcLocation
arcpy.SpatialJoin_analysis(targetFeaturePoly, joinSpatialConvStores, outPolyCStorePoints)
print ("CStore Count Done")&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:27:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106169#M8188</guid>
      <dc:creator>AndrewRowlands</dc:creator>
      <dc:date>2021-12-11T06:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106170#M8189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have it as a featurelayer... I assume you have it loaded in arcmap? &amp;nbsp;It would be interesting to see the dialog with the parameters specified. &amp;nbsp;If it is working with a hardcoded path and not as a feature layer, then it doesn't have enough information to locate it on disk, hence, you would have to code a means to complete the path or change your input data type from featurelayer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 19:16:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106170#M8189</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-30T19:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106171#M8190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you say a bit more on this? Isn't the feature layer/shapefile that's selected in the GetParameter dialog box just a file path to the shapefile? Or is it read a different way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 20:52:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106171#M8190</guid>
      <dc:creator>AndrewRowlands</dc:creator>
      <dc:date>2016-08-30T20:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error 000732 when trying to use GetParameterAsText in python script tool</title>
      <link>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106172#M8191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some background&lt;BR /&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/creating-tools/adding-a-script-tool.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/creating-tools/adding-a-script-tool.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Adding a script tool—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;plus others... I will let you look up the links in the same area&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Setting script tool parameters—Help | ArcGIS for Desktop &lt;BR /&gt;&amp;nbsp; &amp;nbsp; Accessing parameters in a script tool—Help | ArcGIS for Desktop&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; etc&lt;BR /&gt;But in summary, when you are working within arcmap and set your environment workspace and select a layer as input to a tool, the script will work with the layer and use any selection placed upon it. If you run that same script and don't provide a full working path to the file, either by setting the environments or directly providing it. The script has no clue where the file is located.&lt;BR /&gt;The best way is to look at the options available to you when you specify a feature layer, a feature class etc. Some parameters have a little black drop down arrow beside a folder icon. if you select from the list provided by clicking on that arrow, you can choose from layers within arcmap. Alternately, if you click on the folder icon, you get to navigate to the file on disk.&lt;/P&gt;&lt;P&gt;Consider the scenario... you have a layer in arcmap with a selection... you decide to run some tool... if that tool uses the layer within arcmap, only the features selected process will be used by the tool.&lt;BR /&gt;But!!! Damn you say... I want to use this tool, but I don't want to undo the selection... what to do??? simply click on the folder icon, navigate to that file on disk and the process will be run on the whole file REGARDLESS of the selection in ArcMap... cool trick... or a stumbling block.&lt;BR /&gt;What to do? add print statements (for pure python code running) and arcpy.AddMessage statements (for toolbox reporting. Check what you have. If you think you have a file on disk, but all that is reported is the file's name without the path, then you know you have a problem.&lt;/P&gt;&lt;P&gt;The only way to figure out what is what... is to try it, giving the rules are easily forgotten... as for the messaging&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;in_fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
msg &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Input paramater 1... { }"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;msg&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;msg&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can make that print/addmessage into a little def if you want&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;stuff&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;msg&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;"""print stuff for python and/or toolbox scripts"""&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;msg&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;msg&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;then you just call it&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;stuff&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;msg&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;that is all for now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:27:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-000732-when-trying-to-use-getparameterastext/m-p/106172#M8191</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T06:27:53Z</dc:date>
    </item>
  </channel>
</rss>

