Sweep1 closed polyline with a profile

I am trying to sweep1 closed polyline with a profile, while the polyline 1 shows error, and a rectangular NO.2 on the right is correct. It must be something wrong with the closed polyline, I tried to flip it, it does not work, so how should I fix it. Please see file and image below. 2965_Sweep Question.gh (7.0 KB).