Script doesn't work

Hello everyone, it’s my first post :slight_smile:
I need some help. As you can see, i have a problem with my script. When i run it i have a failure message (bottom left hand corner). It seems it’s about the line 45 but i’m still a begginer in python and Blender.

Normally, i should have 3 torus and 50 geodesics for all torus. But I only have one of each.
If i disable the line 45, i have 3 torus but obviously without geodesics.

Hope someone can help me.

Could you post a larger image. It is very difficult to read.
edit: Never mind. It appears that I was seeing the preview.

The message says to check the system console.
The system console can be found in Windows under
Window -> Toggle System Console

or if you are on Linux you have to start Blender from the console. On Mac I think it is the same as in Linux.

Thank you for being quick. I have this on the console.
Is it about an add-on ?

Nobody ?? i didn’t solve this problem yet.

What I think is that boy.ops.mesh.primitive_xyz_surface() is not a Blender Python command. Why don’t you just add a circle mesh …primitive_circle_add()?