chunk is a string, and read_chunks is passed into newstr_fromchars - however, that function takes a list of characters, not a list of strings. Without the loop, there's no need to put the chunk into a list, just call space.newstr_fromstr on the chunk instead.