python - pickle.load() raising EOFError in Windows -


this how code

with open(pickle_f, 'r') fhand:     obj = pickle.load(fhand) 

this works fine on linux systems not on windows. showing eoferror. have use rb mode make work on windows.. isn't working on linux.

why happening, , how fix it?

always use b mode when reading , writing pickles (open(f, 'wb') writing, open(f, 'rb') reading). "fix" file have, convert newlines using dos2unix.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -