title: Error on Celery with Pickle Serialization
body: <p>I'm doing a flask system, and I'm need to use pickle serialization, since it's not JSON serializated.</p>
  
  <p>Error Message:</p>
  
  <blockquote>
    <p>kombu.exceptions.EncodeError: maximum recursion depth exceeded while calling a Python object</p>
  </blockquote>
  
  <p><a href="https://gist.github.com/madpin/ed0ac369ef6d9fe921f02a73c70f6ae7" rel="nofollow noreferrer">Full error</a></p>
  
  <p>The <a href="https://gitlab.com/madpin/daftbot/blob/master/daftbot/routes/api/routes.py" rel="nofollow noreferrer">route</a> file calls for the celery function:</p>
  
  <pre><code>def listing():
      ret = []
      listings = get_sharing_route(22)
      for listing in listings:
          task = daft2db.apply_async((listing, None))
          ret.append(str(task))
          break
  
      return jsonify({'code': ret})
  </code></pre>
  
  <p>Listing is not JSON serializable, so I use the function</p>
  
  <pre><code>@celery.task(serializer='pickle')
  def daft2db(listing, pub_trans_alert):
      return 0
  </code></pre>
  
  <p>from my <a href="https://gitlab.com/madpin/daftbot/blob/master/daftbot/scripts/daft2db.py" rel="nofollow noreferrer">daft2db</a> file.</p>
  
  <p>If you need more information let me know.
  I'm really lost here.</p>