#13119: Can't pickle queryset ---------------------------------------------------+------------------------ Reporter: anentropic | Owner: nobody Status: closed | Milestone: Component: Database layer (models, ORM) | Version: 1.2-beta Resolution: worksforme | Keywords: querySet pickle Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------------------------+------------------------ Changes (by russellm):
* status: new => closed * needs_better_patch: => 0 * resolution: => worksforme * needs_tests: => 0 * needs_docs: => 0 Comment: Works for me: {{{ >>> import pickle >>> pickle.dumps(RatingDimension.objects.all()) ccopy_reg _reconstructor p0 (cdjango.db.models.query QuerySet p1 ... }}} Two suggestions for providing bug reports: 1. Provide an example of the code that is failing. "Pickling" is a very vague operation, and as I've demonstrated, it does work under some circumstances. You need to give specific instructions for how to generate a failure. Remember that Django has a fairly extensive test suite, and there are lots of pickling tests. If there is a problem, it's more than likely going to be in edge case usage. 2. An example is good, but a *minimal* example is better. Is the RatingDimensionManager necessary to stimulate this problem? What about the Meta? The __unicode__ call? I don't doubt that these are necessary for your code, but they don't assist the debugging process. Looking at your models, there's a good chance that this is a duplicate of #12924. I'm going to close this ticket worksforme (because it does). If it turns out that this isn't a duplicate of #12924, please reopen with a minimal example and a sample of how to induce the error. -- Ticket URL: <http://code.djangoproject.com/ticket/13119#comment:1> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.