I am attempting to write a script where I have a field called SPCOMP containing info such as "PJ 90BW 10". I am trying to pull the numbers and put them in respective fields. E.G. A field called PJ would be populated with the number 90. I had it work once, but now I am receiving this error - ERROR 000539: Runtime error SyntaxError: encoding declaration in Unicode string (<string>, line0). Here is the code I am Using def getPJ(spcomb): if 'PJ' in spcomb: n = spcomb.find('PJ') return spcomb[n+3:n+6] else: return 0 PJ = getPJ( !SPCOMP! )
... View more