title: Saving Python Pickled objects in MySQL db
body: <p>I am pickling Python Objects in Django and saving it in MySQL db.
  So far i have followed these simple rules:</p>
  
  <ol>
  <li><p><code>cPickle.dumps(object)</code> #to convert python object to pickled object </p></li>
  <li><p><code>cPickle.loads(pickled_object)</code> # to load back the python object from pickled object</p></li>
  <li><p>My Django <code>Model Field</code> is <code>Text Field</code></p></li>
  <li><p>MySQL db field Type is <code>longblob</code> Attributes <code>binary</code></p></li>
  <li><p>MySQL db encoding is <code>utf8_unicode_ci</code></p></li>
  </ol>
  
  <p>Unfortunately i am getting following error while loading back python object.</p>
  
  <pre><code>Type Error: ('an integer is required', &lt;type 'datetime.date'&gt;, ('x07xb6x0bx06',))
  </code></pre>
  
  <p>It seems to me by looking on error value <code>x07xb6x0bx06</code> this is an encoding problem.
  Did i miss some important step?? Can any one help me to solve this problem??</p>