Turbine simulation via epanet toolkit in Python

Hi all,

I utilised epanet toolkit in Jupiter to model a micro pumped storage. To model the turbine I substitute it with GPV. However, I faced an error when I was about assigning the head loss-flowrate curve to the GPV. following is part of my code and the reported error:

I highly appreciate it if you guide me on how to solve it.

An update regarding the errors I encountered, I had the same problem with assigning the efficiency-flowrate curve to the pump, but I solved it by adding the following function to the code: en.setcurvetype(ph=firstpractice,index=2, type=en.EFFIC_CURVE)
However, the error of the GPV curve still remains. I welcome your suggestions.