Hello,
I'm writing for some assistance in troubleshooting converting an old Model from VB script to Python.
The specific area giving me trouble is a Calculate Field Expression
here's what I started with:
=[AREA_CODE] & Replace ([BIDDER_PERCENTAGES_TABLE_SELECT_BLOCK_NUMBER], " ", "")
this gave error00539 'Replace' is not defined
Here's a couple things I attempted:
!AREA_CODE! & Replace (!BIDDER_PERCENTAGES_TABLE_SELECT_BLOCK_NUMBER!, " ", "")
^same error code
!AREA_CODE! + replace (!BIDDER_PERCENTAGES_TABLE_SELECT_BLOCK_NUMBER!, " ", "")
^same error code
!AREA_CODE! + (!BIDDER_PERCENTAGES_TABLE_SELECT_BLOCK_NUMBER!, " ", "")
^error 00539-TypeError: can only concatenate str (not "tuple") to str
!AREA_CODE! + tuple(!BIDDER_PERCENTAGES_TABLE_SELECT_BLOCK_NUMBER!, " ", "")
^error 00539-TypeError: tuple expected at most 1 arguments, got 3
!AREA_CODE! + [tuple(!BIDDER_PERCENTAGES_TABLE_SELECT_BLOCK_NUMBER!, " ", "")]
^error 00539-Syntax error: invalid syntax
I'm at a bit of a loss as to what to try next
please let me know what you think
Sincerely,
Christopher
@arcgis_python