Quantcast
Channel: User Sourav Kannantha B - Stack Overflow
Viewing all articles
Browse latest Browse all 60

Python2 unable to pickle string

$
0
0

This link says that both normal and unicode strings can be pickled. But when I try following,

    def __del__ (self):        with open(self._pkl, 'wb') as f:            pickle.dump(dict(self._rec), f)

I'm getting

Exception TypeError: TypeError("can't pickle String objects",) in <bound method PickleOutput.__del__ of <pickleoutput.PickleOutput instance at 0x7f21989214d0>> ignored

error.

I'm unable to see what is wrong. Someone please help.


Viewing all articles
Browse latest Browse all 60

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>