Can't join newly created layer with arcpy

309
2
Jump to solution
01-20-2023 10:13 AM
Labels (3)
Davec43
Occasional Contributor

For whatever reason it'll create the new layer to be joined but errors out when it gets to the join. Although the Join will work if I run it through GEO tools?

import os
import sys
import arcpy
#Paramaters
Database_Path = arcpy.GetParameterAsText(0) # Database Path for RTL/Tracks GDB
Existing_GDB = arcpy.GetParameterAsText(1) # Path to working GDB
Tracks_Join = arcpy.GetParameterAsText(2) # Path to working GDB
#Joins and paths
FP1 = os.path.abspath(Existing_GDB)
outputFile =  fr"{FP1}\Tracks_Joined"
#ArcPy Execution
arcpy.management.CreateFileGDB(Database_Path, "RTL.gdb")
arcpy.management.CreateFileGDB(Database_Path, "Tracks.gdb")
arcpy.management.CopyFeatures(Tracks_Join, fr"{FP1}\Tracks_Joined")
arcpy.SetParameterAsText(3, outputFile)
arcpy.management.JoinField("Tracks_Joined", "Event", "Points_Filtered", "Event", None)

 

0 Kudos
2 Solutions

Accepted Solutions
RhettZufelt
MVP Frequent Contributor

Could be because it can't find "Points_Filtered" feature class as the path isn't defined anywhere.

What is error?

R_

View solution in original post

0 Kudos
Davec43
Occasional Contributor

The error was on my end I was pointing to the wrong GDB. Thanks for the help!

View solution in original post

2 Replies
RhettZufelt
MVP Frequent Contributor

Could be because it can't find "Points_Filtered" feature class as the path isn't defined anywhere.

What is error?

R_

0 Kudos
Davec43
Occasional Contributor

The error was on my end I was pointing to the wrong GDB. Thanks for the help!