Select to view content in your preferred language

Python syntax error

2291
3
Jump to solution
09-23-2015 01:47 PM
CoyPotts1
Occasional Contributor III

I'm figuring this is a very basic error, but I have been looking at this for a good while now and I can't figure out the syntax error that is kicking back here.  Maybe a few other sets of eyes on here will help resolve the issue. 

I keep getting a syntax error for line 16.  It is exactly the same as line 5, but line 5 runs just fine.

# Start message
arcpy.AddMessage("Exporting the general features feature class to the " + dbDate + " FGDB...")

# Execute FeatureClassToFeatureClass - General
arcpy.FeatureClassToFeatureClass_conversion(generalFeatures, outFGDB, outGeneral)

# End message
arcpy.AddMessage("General features feature class has been exported to the " + dbDate + " FGDB!")
arcpy.AddMessage("...")
arcpy.AddMessage("...")

# Start message
arcpy.AddMessage("Exporting the node features feature class to the " + dbDate + " FGDB..."

# Execute FeatureClassTo FeatureClass - Node
arcpy.FeatureClassToFeatureClass_conversion(nodeFeatures, outFGDB, outNode)

# End message
arcpy.AddMessage("Node features feature class has been exported to the " + dbDate + " FGDB!")
arcpy.AddMessage("...")
arcpy.AddMessage("...")

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
RebeccaStrauch__GISP
MVP Emeritus

Either line 13 is truncated, or you are missing a ")"  or maybe something else?

View solution in original post

0 Kudos
3 Replies
RebeccaStrauch__GISP
MVP Emeritus

Either line 13 is truncated, or you are missing a ")"  or maybe something else?

0 Kudos
CoyPotts1
Occasional Contributor III

You are correct!  I have been trying to fix the issue with line 13, but it wasn't actually line 13 that was causing the problem.  I was missing a closing parentheses just before it.

A product of copy/paste when the copied text was actually incorrect. 

I've been looking at this off an on while doing other things for a couple hours lol...I knew it was going to be super basic.

Thanks for taking a look .

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

....sometimes an extra set of eyes is just what you need.   Been there.

0 Kudos