Setting an attribute with a variable

I am using pvpython script to create a plot, it works well when I hard code the value, but I want to use a variable. I successfully pass the variable, verified by the print command

# create a new 'Plot Over Line'
print("xvalue=", xvalue)
plotOverLine1 = PlotOverLine(registrationName='PlotOverLine1', Input=step_t0001vtu)
plotOverLine1.Point1 = [xvalue, 0.0, 0.0]
plotOverLine1.Point2 = [xvalue, 0.096, 0.0]

but the plotOverLine1.Point1 = [xvalue, 0.0, 0.0] line doesn’t except the variable

xvalue= 0.0036

Traceback (most recent call last):
  File "C:\featest\ElmerFEM_Colab\ParaviewScripts\plotline.py", line 109, in <module>
    plotOverLine1.Point1 = [xvalue, 0.0, 0.0]
  File "C:\Program Files\ParaView 5.11.0\bin\Lib\site-packages\paraview\servermanager.py", line 496, in __setattr__
    setter(self, value)
  File "C:\Program Files\ParaView 5.11.0\bin\Lib\site-packages\paraview\servermanager.py", line 2612, in setProperty
    return self.SetPropertyWithName(propName, value)
  File "C:\Program Files\ParaView 5.11.0\bin\Lib\site-packages\paraview\servermanager.py", line 355, in SetPropertyWithName
    prop.SetData(arg)
  File "C:\Program Files\ParaView 5.11.0\bin\Lib\site-packages\paraview\servermanager.py", line 879, in SetData
    self.SMProperty.SetElement(idx, val)
TypeError: SetElement argument 2:

Any suggestions?

Is xvalue a float?

I forced it to be a float and now it works. Thanks