Bmesh extrude problem

i did some verts with a loop

if vid > 0: # Add edges
514 edges1.append([vid-1], bm.verts[vid])))

then i tried to extrude the edges made with he following

Extrude and create geometry

edges_start_a = bm.edges[:]

ret = bmesh.ops.extrude_edge_only(
geom_extrude_mid = ret[“geom”]

verts_extrude_b1 = [ele for ele in geom_extrude_mid
if isinstance(ele, bmesh.types.BMVert)]

del ret

but i get an error on the line for making edges before the extrude part

so was there any chanhes to the extrude command
or why is it giving an error like this

nd\", line 514, in graphic2
ValueError: this edge exists


you can’t create an edge from two verts if these two verts are already the verts of an edge. You needed to duplicate the verts first.

sorry not the problem i copied something working from a class to a function
so more like indentation problem which was difficult to see
and also error was on a working line before the new code added
which was very strange

but late yesteday night after a walk outside it got the solution!