python 2.6 cPickle.load results in EOFError

后端 未结 1 1300
暗喜
暗喜 2021-02-14 05:48

I use cPickle to pickle a list of integers, using HIGHEST_PROTOCOL,

cPickle.dump(l, f, HIGHEST_PROTOCOL)

When I try to unpickle this using the

1条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-14 06:39

    If you are on windows, make sure you

    open(filename, 'wb') # for writing
    open(filename, 'rb') # for reading
    

    0 讨论(0)
提交回复
热议问题