Within this code every time I go to run this code through Abaqus i receive the same syntax error within this section
displacement_data[val.nodeLabel]["X0"].append(xyzi[0]) displacement_data[val.nodeLabel]["Y0"].append(xyzi[1]) displacement_data[val.nodeLabel]["Z0"].append(xyzi[2])The remainder of the code is this.
import time import os import csv Job_str = 'UpdatedLandmarks2' start_time = time.time() os.chdir('C:/Users/awaugh/Documents/Abaqus nonsense') odbName = Job_str + '.odb' odb = session.openOdb(odbName) myAssembly = odb.rootAssembly ROINodeSet1 = myAssembly.nodeSets['Clean Landmarks'] xi = [] yi = [] zi = [] labels = [] label = [] F1 = [] F2 = [] displacement_dataX = [] displacement_dataY = [] displacement_dataZ = [] count = 0 specific_node_labels = { "ACL F": 235, } # Initialize displacement data for specific node displacement_data = {label: {"X0": [], "Y0": [], "Z0": []} for label in specific_node_labels.values()} # Get the last frame from the step timeFrame = odb.steps['ApplyFemRotation'].frames[-1] displacement = timeFrame.fieldOutputs['U'] ROINodeDisp1 = displacement.getSubset(region=ROINodeSet1) labels = [] # Make sure labels is initialized as an empty list # Collect displacement data only for specific nodes for val in ROINodeDisp1.values: if val.nodeLabel in specific_node_labels.values(): # Check if the node is in our specific nodes labels.append(val.nodeLabel) # Append node labels for nod in ROINodeSet1.nodes: if nod.label == val.nodeLabel: xyzi = nod.coordinates displacement_data[val.nodeLabel]["X0"].append(xyzi[0]) displacement_data[val.nodeLabel]["Y0"].append(xyzi[1]) displacement_data[val.nodeLabel]["Z0"].append(xyzi[2])