Select to view content in your preferred language

ArcPro 2.5 field calculator bug

2364
10
Jump to solution
05-01-2020 08:07 AM
PRuss
by
New Contributor III

"\\DPWTECHENG\Plat\" + !plat_book! + "_" + !plat_page! + ".tif"

throws an syntax error in ArcPro 2.5

"\\DPWTECHENG\Plat\ " + !plat_book! + "_" + !plat_page! + ".tif"

is valid in ArcPro 2.5 field calculator, the only difference is adding a space after \Plat\

Problem: We don't want that extra space after \Plat\

any ideas on when this bug will be fixed?

0 Kudos
10 Replies
DrewFlater
Esri Regular Contributor

Instead of trying to figure out how to construct the path with all the \ which are Python escape characters, use the very handy os function, os.path.join():

os.path.join(r"\\DPWTECHENG\Plat", !plat_book! + "_" + !plat_page! + ".tif")