AnsweredAssumed Answered

Trying to use python to insert certain attributes into a hyperlink in a field

Question asked by Carusot42 on Sep 17, 2014
Latest reply on Sep 17, 2014 by Carusot42

Basically just trying to get python to concatenate a couple of field values into a link, specifically to get it to make a complete link to the image mate online using tax id and swis code found in said table.


Here's my code: *disclaimer* I have very little experience coding...


import arcpy


parcel = "(address to my file here)"


image = ""
mate = "&printkey="
swis = "SWIS"
sbl = "PRINTKEY"
link = "link"


with arcpy.da.UpdateCursor(parcel, [swis, sbl, link]) as cursor:
    for row in cursor:
        row[2] == image.string() + row[0] + mate.string() + row[1]


print "finished"


I keep getting the error:


Runtime error


Traceback (most recent call last):


  File "<string>", line 11, in <module>


and then a runtime error saying it can't access the file I'm trying to get it to access. Is my code OK, and it just can't access the file? Or is my code incorrect as well?


Thanks in advance,