Hi,
I have defined all the options for the LoadSegment() kwd. However, when I print the keyword I get an error suggesting an integer is required. I'm struggling to work out what the issue is. When I inspect each of the objects I give to the keyword I still can't find the issue.
Here is the relevant part of my code:
elements = v_elements.elements
print(elements.head())
# Create the DefineCurve keyword with ID 1000
pressure_curve = kwd.DefineCurve()
pressure_curve.lcid = 1000
pressure_curve.curves = curve_data
pressure = kwd.LoadSegment()
pressure.lcid = pressure_curve.lcid
pressure.sf = 1.2
pressure.at = 0
pressure.n1 = elements["n1"].tolist()
pressure.n2 = elements["n2"].tolist()
pressure.n3 = elements["n3"].tolist()
pressure.n4 = elements["n4"].tolist()
pressure.n5 = elements["n5"].tolist()
pressure.n6 = elements["n6"].tolist()
pressure.n7 = elements["n7"].tolist()
pressure.n8 = elements["n8"].tolist()
And here is the error:
in write_field_c
holler.write_int(buf, value, width)
File "src\_writer.pyx", line 63, in hollerith._writer.write_int_to_buffer
TypeError: an integer is required
If anyone could provide some guidance for writing the loadsegment() keyword I'd be very grateful.
Cheers,
B