I'm making a bunch of abstract objects that are shaped programmatically. I use a Bezier curve, you get nice molds with few points. Then I need to convert it into a mesh object. Blender version is 2.80.
It's easy to get a mesh object from a curve manually:
Keep the original curve object so it can be reused:
In edit mode the vertices are there so it really is a mesh object:
Now how you do the same with a Python script? I've tried this that and the other but only got various error messages. I'm sure there must be a simple way to do that. Let's not go through all my trials but I attach some error messages just to show you I've been working on this:
RuntimeError: Operator bpy.ops.object.convert.poll() failed, context is incorrect
RuntimeError: Error: Can not create object in main database with an evaluated data data-block
ReferenceError: StructRNA of type Mesh has been removed