Start Time: Thu Nov 01 10:13:08 2012 ERROR 000539: <type 'exceptions.SyntaxError'>: EOL while scanning string literal (<expression>, line 1) Failed to execute (Calculate Field). Failed at Thu Nov 01 10:18:15 2012 (Elapsed Time: 5 minutes 7 seconds)
def setAPN2(parcel): try: parcel = parcel.strip() strValue = parcel[0:3] + '-' + parcel[3:5] + '-' if len(parcel) <= 8: strValue += parcel[5:] else: strValue += parcel[5:8] + '-' + parcel[8:] except: strValue = 'Unable to calculate' return strValue
setAPN2(str(!PG_APN!))
def setAPN2(parcel): if parcel != 'None': try: parcel = parcel.strip() strValue = parcel[0:3] + '-' + parcel[3:5] + '-' if len(parcel) <= 8: strValue += parcel[-3:] else: strValue += parcel[5:8] + '-' + parcel[-1:] except: strValue = 'Error - unable to calculate' return strValue
def setAPN2(parcel): if parcel != 'None': try: strValue = parcel[0:3] + '-' + parcel[3:5] + '-' if len(parcel) <= 8: strValue += parcel[-3:] else: strValue += parcel[5:8] + '-' + parcel[-1:] execept: strValue = 'Error - unable to calculate' return strValue
setAPN2(str(!PG_APN!).strip())
def setAPN2(parcel): if parcel != 'None': try: strValue = parcel[0:3] + '-' + parcel[3:5] + '-' if len(parcel) <= 8: strValue += parcel[-3:] else: strValue += parcel[-1:] return strValue execept: pass
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.