ValueError: negative dimensions are not allowed

! I made this error because of the feature_ Why does this error occur when len is -1? Are there any good ways to correct itimage|538x499