Help with image macro error

I just downloaded fjij, so I have no idea how to use it. I am trying to find the radius of curvature from a picture, so I googled how to do that.

I found some code and ran it by doing Plugins>>New>>Macro, and then pasting the code in there. When I hit run, I got the following error message: “Composite selections cannot be converted to lines. In line 10 run (“Area to Line” <)>;”. Then there was a line below it that said “Show ‘Debug’ Window” with a box next to it that I could click.

I will paste the code I am using below. If someone could help me figure out how to fix the error, that would be great!

// imagej-macro “curvatureRadius-2” (Herbie G., 05. December 2018)
requires( “1.52i” );
setOption(“BlackBackground”, true);
run(“Find Edges”);
setAutoThreshold(“Minimum dark”);
run(“Convert to Mask”);
run(“Create Selection”);
run(“Area to Line”);
run(“Fit Circle”);
getSelectionBounds(x, y, w, h);
print("Radius: "+d2s(w*0.5, 1));
// imagej-macro “curvatureRadius-2” (Herbie G., 05. December 2018)

Dear @Eden_Thompson
Based off the Composite selections cannot be converted to lines error you received, it looks like the run(“Area to Line”) command cannot be applied to the composite image you are trying to analyze.
I would recommend trying to converting your image to RGB (Stack to RGB) or splitting your composite image into different color channels (Split Channels) and only running the analysis on one image channel.

Let me know if this helps.