Create fitting between pipes by detailcurve

Doesn’t seem to work. i even tried splitting up the scripts. Could i be using the wrong fittings and/or pipes?