POST
|
Thank you! That did the trick I really appreciate everybody's input!
... View more
04-28-2017
08:47 AM
|
0
|
1
|
802
|
POST
|
Sure thing, New Script: arcpy.CalculateField_management(in_table="AssessVP", field="IMAGELINK", expression="""!IMAGELINK!.replace(r"\\","/")""", expression_type="PYTHON_9.3", code_block="") Error Message: Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 3457, in CalculateField raise e ExecuteError: ERROR 000539: SyntaxError: EOL while scanning string literal (<expression>, line 1) Failed to execute (CalculateField).
... View more
04-28-2017
07:18 AM
|
0
|
4
|
802
|
POST
|
Yes, unfortunately " \ \" still bombs the script. not quite sure what I am missing here, I thought that would be the easy solution too. Thanks for the reply!
... View more
04-28-2017
07:12 AM
|
0
|
6
|
802
|
POST
|
Hello all, I am fairly new to python and am having issues renaming file paths within a table. I need to replace all of my \ for / within a field. \ is an escape so it is not working. Here is a brief snippet of my code: arcpy.CalculateField_management(in_table="Assess", field="IMAGELINK", expression="""!IMAGELINK!.replace(r"\","/")""", expression_type="PYTHON_9.3", code_block="") I know there are easy ways to do this with VB and with field calculator but I am trying to automatic a much bigger table update. edit: I've tried using \ \ instead and still had no luck. edit 2: This is ultimately what worked for me, thank you Joshua expression=r"""!IMAGELINK!.replace("\\","/")"""
Any advice is much appreciated! Thanks
... View more
04-28-2017
06:33 AM
|
0
|
9
|
1611
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|