<?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: Trouble with Append input and target in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/trouble-with-append-input-and-target/m-p/206255#M15872</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;formatting will also give line numbers and make the code easier to read&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2016/08/14/script-formatting"&gt;/blogs/dan_patterson/2016/08/14/script-formatting&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Nov 2019 19:32:34 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2019-11-06T19:32:34Z</dc:date>
    <item>
      <title>Trouble with Append input and target</title>
      <link>https://community.esri.com/t5/python-questions/trouble-with-append-input-and-target/m-p/206253#M15870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm currently working on a script that will take 5 parameters from the user: a workspace, a new folder name, 2 file GDBs, and a feature class. The script will create a new folder inside the workspace specified by the user. I needed the new name variable to get the full name of one of the file GDBs with the slash in front of it in order to create a file path. db1 then gets copied to the new folder.&lt;/P&gt;&lt;P&gt;Everything down to the copy function works. I'm having issues with the append function. I need the append to take a feature class from DB2 and append it to the feature class in DB1. But whenever I run the script, I get the following error:&lt;/P&gt;&lt;P&gt;ExecuteError: Failed to execute: Parameters are not valid.&lt;/P&gt;&lt;P&gt;ERROR 000338: Inputs must be either all Feature Classes, Tables or Rasters; not mixed.&lt;/P&gt;&lt;P&gt;Failed to execute (Append).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that I need my input and target to both have the Feature Class data type. Based on what I've coded, DB2_Figure8 is being read as a string due to the GetParameterAsText function. The westFigure8 variable is also a string. The westFigure8 variable is supposed to be a file path into the copied file GDB to access one of the feature classes in that file GDB. So I have 2 strings that need to have the Feature Class data type instead but I'm not sure how to make that happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#import necessary modules&lt;BR /&gt;import arcpy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Get parameters set by user.&lt;BR /&gt;arcpy.env.workspace = arcpy.GetParameterAsText(0) #sets the workspace&lt;BR /&gt;folderName = arcpy.GetParameterAsText(1) #allows user to name the folder. folder name should be the date i.e. #mmddyy&lt;BR /&gt;DB1 = arcpy.GetParameterAsText(2) #the file GDB that will be copied to the new location&lt;BR /&gt;DB2 = arcpy.GetParameterAsText(3) #the second file GDB that will be appended to the original file GDB&lt;BR /&gt;DB2_Figure8 = arcpy.GetParameterAsText(4) #the TCOMM_FIGURE8 feature class from the second file GDB&lt;BR /&gt;&lt;BR /&gt;newFolder = arcpy.CreateFolder_management(arcpy.env.workspace, folderName) #creates the new folder with data #type Folder&lt;BR /&gt;newName = DB1[-13:] #takes the string which contains the file path for the file GDB that will be copied and truncates #the name so it is left with the final slash to the end of the file name i.e. \WestTTMP.gdb&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;newPath = str(newFolder) + newName #takes the new folder and converts to a string then combines it with the #truncated file name to create a new file path for the file GDB&lt;BR /&gt; &lt;BR /&gt;arcpy.Copy_management(DB1, newPath) #takes the DB1 file GDB and copies it to the new location&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;westFigure8 = newPath + "/" + "TCOMM_FIGURE8"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.Append_management("DB2_Figure8", "westFigure8", "TEST", "", "")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2019 16:25:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trouble-with-append-input-and-target/m-p/206253#M15870</guid>
      <dc:creator>RyanF</dc:creator>
      <dc:date>2019-11-06T16:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Append input and target</title>
      <link>https://community.esri.com/t5/python-questions/trouble-with-append-input-and-target/m-p/206254#M15871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about adding some print statements to see if your variables are being populated properly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2019 16:43:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trouble-with-append-input-and-target/m-p/206254#M15871</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2019-11-06T16:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Append input and target</title>
      <link>https://community.esri.com/t5/python-questions/trouble-with-append-input-and-target/m-p/206255#M15872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;formatting will also give line numbers and make the code easier to read&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2016/08/14/script-formatting"&gt;/blogs/dan_patterson/2016/08/14/script-formatting&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2019 19:32:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trouble-with-append-input-and-target/m-p/206255#M15872</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-11-06T19:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Append input and target</title>
      <link>https://community.esri.com/t5/python-questions/trouble-with-append-input-and-target/m-p/206256#M15873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You marked this question as answered, but did not provide an explanation of how it solved your problem so it can help others with similar python programming issues.&amp;nbsp; As such, can you provide some explanation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you working with python 2.7 with ArcMap or python 3.x with Pro?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2019 19:00:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trouble-with-append-input-and-target/m-p/206256#M15873</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2019-11-07T19:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Append input and target</title>
      <link>https://community.esri.com/t5/python-questions/trouble-with-append-input-and-target/m-p/206257#M15874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;… "westFigure8" ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;on whatever line number this is on&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;arcpy.Append_management("DB2_Figure8", "westFigure8", "TEST", "", "")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;should probably have been&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;westFigure8 … the variable, and not the string&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2019 19:20:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trouble-with-append-input-and-target/m-p/206257#M15874</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-11-07T19:20:30Z</dc:date>
    </item>
  </channel>
</rss>

