I am trying to add on field output variable in elemental labels of an odb. I opened the odb using this command
odb = openOdb(path=ODB_Name, readOnly=False)
then I calculated field output variable and save it following these commands
field_output = Frame.FieldOutput(name='NewConnectorValues', description='Current stress for connector elements', type=SCALAR)
instance = odb.rootAssembly.instances['INSTANCE']
connector_element_labels = np.arange(1, len(area_all) + 1, dtype=np.int32)
field_output.addData(position=WHOLE_ELEMENT, instance=instance,labels=connector_element_labels,
data=axon_stress)
odb.save()
It ended up with this error
OdbError: Database save failed. ***ERROR: Attempt to truncate read only table.
File "calculate_stress.py", line 96, in
odb.save()
