Standard_OutOfRangeNCollection_Sequence::Value raised from method Point of class GeomAPI_IntCS

This is my test code:

X,Y,Z,VX,VY,VZ = self._display.View.ConvertWithProj(x, y)
P1 = gp_Pnt()
Vp2 = gp_Vec()
P1.SetCoord(X, Y, Z)
Vp2.SetCoord(VX,VY,VZ)
gpLin = gp_Lin(P1, gp_Dir(Vp2))
aCurve = Geom_Line(gpLin)

if PlaneOfTheView is None:
    PlaneOfTheView = Geom_Plane(gp_Pln(gp_Pnt(0,0,0),gp_Dir(0,1,0)))

CS = GeomAPI_IntCS(aCurve, PlaneOfTheView)

I tried to convert the 2D coordinates of the mouse to 3D coordinates on a plane. But I met Standard_OutOfRangeNCollection_Sequence::Value raised from method Point of class GeomAPI_IntCS Please help me.