N.B. creating the write struct does *not*, for example, require being able to open the actual file for writing. Therefore, this isn't an IO issue (if the error is indeed what it says).
I think this is probably an outdated library. Probably, updating/compiling the PyGame version as suggested is necessary. Ian