ERROR 000622 and ERROR 000628

1037
3
Jump to solution
07-14-2021 10:58 PM
DimasPerceka
New Contributor

I try to follow tutorial in ESRI training (https://learn.arcgis.com/en/projects/update-real-time-data-with-python/), but have problem in converting JSON to Feature. I think that my error  in lines 38-42 in the script I made. but I don't know the details of where the error is.

112.jpg

 

111.jpg

 

0 Kudos
1 Solution

Accepted Solutions
Tim_McGinnes
Occasional Contributor III

The first parameter of both the Add Field and Calculate Field tools should be a table, but you have the first parameter as the geodatabase and the second as the table. Try something like the following:

arcpy.management.AddField(os.path.join(gdb_name, "alert_stations"), "alert_level", "SHORT", field_alias="Alert Level")
arcpy.management.AddField(os.path.join(gdb_name, "alert_areas"), ...

arcpy.management.CalculateField(os.path.join(gdb_name, "alert_stations"), "alert_level", "int(!alert!)")
arcpy.management.CalculateField(os.path.join(gdb_name, "alert_areas"), ...

 

View solution in original post

3 Replies
Tim_McGinnes
Occasional Contributor III

The first parameter of both the Add Field and Calculate Field tools should be a table, but you have the first parameter as the geodatabase and the second as the table. Try something like the following:

arcpy.management.AddField(os.path.join(gdb_name, "alert_stations"), "alert_level", "SHORT", field_alias="Alert Level")
arcpy.management.AddField(os.path.join(gdb_name, "alert_areas"), ...

arcpy.management.CalculateField(os.path.join(gdb_name, "alert_stations"), "alert_level", "int(!alert!)")
arcpy.management.CalculateField(os.path.join(gdb_name, "alert_areas"), ...

 

DimasPerceka
New Contributor

Thank you very much for your help

DimasPerceka_0-1626484073627.png

 

0 Kudos
DimasPerceka
New Contributor

And if i continue to next step, i found this trouble. Here I attach the error and the script that was made.

DimasPerceka_0-1626486074521.png

DimasPerceka_2-1626486136349.pngDimasPerceka_3-1626486154576.png

I'm very happy if you can help me with this problem. Thank you

0 Kudos