link new object to scene with python in 2.8
The issue with your code comes from an api change in 2.80.
We no longer link objects to the scene, they have to be linked to a collection.

So all you have to do to make your script work is to change your scene references to collections

You old code:

scene = bpy.context.scene
scene.objects.link(ob)
scene.update()


Replace with this:

scene = bpy.context.scene
scene.collection.objects.link(ob)


Or shorter:

bpy.context.collection.objects.link(ob)


Or if you wanted to link the objects to a specific collection you'd do this with this line:

bpy.data.collections["Collection Name"].objects.link(ob)