Can we try the following?
When running python on a class with attribute rules you must specify all the fields required by the attribute rule in the python cursor.
Here is an example
I have a table with three fields a,b, and c.
Field c has an attribute rule return $feature.b * 2. So the rule require fields b and c
Because b and c are required by the attribute rules those fields must by passed to python as follows.
def update_standalone(fields):
with arcpy.da.UpdateCursor(str(gdb / 'standalone'), fields) as cursor:
for row in cursor:
row[0] += 1
cursor.updateRow(row)
print('Running')
update_standalone(['a', 'b', 'c']) # Succeeds
# passing only a will fail
# update_standalone(['a']) # RuntimeError: Failed to evaluate Arcade expression.
# passing only b will also fail
# update_standalone(['b']) # SystemError: <method 'updateRow' of 'da.UpdateCursor' objects> returned NULL without setting an error
# passing all fileds or the required fields for attribute rules will succeed
# update_standalone(['a', 'b', 'c']) # Succeeds
# update_standalone(['b', 'c']) # Succeeds
print('Done')