Don't try to read from a StreamIO object without a path
Fixes the strange issue where we tried to read from a StringIO-object