I am not an expert on this, but I kind of recognized the problem. I had the same issue using ITSxpress. It turned out the error appeared when some of the reads were trimmed to length 0. Maybe this is causing a problem for you as well?
@einamart but line 9 looks fine to me...can you please check the image I have attached and let me know. Maybe I am missing out something here which you can pinpoint. Thank you.
Yes, the untrimmed looks good. The problem could be that cutadapt doesn´t accept returning trimmed samples with no sequences. It was just a guess, hopefully someone else will add some information on this