On Aug 26, 11:04 pm, Philip Semanchuk <phi... at semanchuk.com> wrote: > Try using "rb" instead of "r" for the mode in the call to open(). > > HTH > Philip That does indeed fix the problem, thanks! Still seems like the docs are wrong though.