Yeah I changed it to a StringIO after @myronmarston suggested it.