move to surface


#1

I am a beginner level programmer. I urgently need this code. It is giving me error. Any help would be highly appreciated.
bvl_gear = cone()
bvl_gear.radius1 = 3
bvl_gear.radius2 = 6
bvl_gear.height = 3
bvl_gear.heightsegs = 1
bvl_gear.capsegs = 1
bvl_gear.sides = 20

bvl_sphere = sphere()
bvl_sphere.radius = large_radius

bvl_sphere_patch = convertToNURBSSurface bvl_sphere

bvl_ellipse_deform = surfDeform()
addmodifier bvl_gear bvl_ellipse_deform
bvl_ellipse_deform.surface = bvl_sphere_patch
bvl_ellipse_deform.Plane_to_Patch_Deform = 1

I am getting error in
bvl_ellipse_deform.surface = bvl_sphere_patch

I tried many ways but no luck.

Thanks and regards,
Ravi Shankar Gautam