#36033: Getting TypeError: cannot pickle 'dict_values' object Error with Django
4.2.16
-------------------------------------+-------------------------------------
Reporter: Bittu Ray | Owner: (none)
Type: Uncategorized | Status: closed
Component: Core (Cache system) | Version: 4.2
Severity: Normal | Resolution: invalid
Keywords: Django 4.2, Cache | Triage Stage:
error, Redis Cache, Pickle | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Bittu Ray):
I am providing here how to reproduce it
{{{
from django.core.cache import cache
val = {"a":1, "b":2, "c":3}
queryset = Record.objects.filter(id__in=val.values())
cache.set("key", queryset)
}}}
Try this, you will get this error dict_values cannot be pickled, while in
Django 3.2 it's working fine
--
Ticket URL: <https://code.djangoproject.com/ticket/36033#comment:4>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070193f34e5176-a7f84080-763a-4de6-9a75-f1bd0fc258da-000000%40eu-central-1.amazonses.com.