I have found the solution for the bug, it's problem was AddSweep2 expects 2 lists, so if you input just 1 shape curve, it will fail, even though you might just need one.
You have to create a list out of shape curve(s), even though if you have only one shape curve.
rails = [r1,r2]
shape = [shape_curve]
Code:
def extrude_surfaces(self, u_strip, v_strip, mat_thick):
for u_i in u_strip:
edg = rs.DuplicateEdgeCurves(u_i)
rs.DeleteObject(edg[2])
r1 = edg[3]
if not rs.CurveDirectionsMatch(r1, edg[0]):
rs.ReverseCurve(edg[0])
r2 = edg[0]
shape = edg[1]
lst_rail = [r1, r2]
lst_shape = [shape]
rs.AddSweep2(lst_rail, lst_shape)