I exported my project out of iMovie (10.2.5 Catalina) successfully, then I decided it needed a half second of 'black' at the beginning to to make the video match the music better. I inserted a snippet of 'black' video, then it wouldn't export, giving this error (screenshot). After a while, I realized that the black video was an .AVI, originally from a windows machine, and iMovie doesn't like .AVI about half the time. I transcoded that .avi into H264 with Handbrake, it then exported successfully. Just FYI because I've seen this issue discussed in different web sites. (On a side note, I haven't figured out why iMovie sometimes will import an .avi, and sometimes not.)