Grasshopper python:Project Curve To Surface issue

Hi guys, I used a python function called ProjectCurveToSurface. But I got an error, which said:
Runtime error (TypeErrorException): iteration over non-sequence of type NoneType

So does anyone know why doesn’t it work?

python project curve to (4.5 KB)

Just use the default type for the object type.

python project curve to (6.0 KB)

It worked! Thank you!