-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: cannot pickle '_thread.lock' object #542
Comments
I have a proposed PR that has a custom deepcopy to avoid these pickle issues. |
full stack trace, for posterity. It isn't clear how this _thread object appears in the deepcopy...
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'll start with I don't know WHY the Q object has a _thread.lock object in it ... but ...
I think this is caused by this code, and the deepcopy of the Q object:
translate_polymorphic_Q_object(queryset_model, copy.deepcopy(q), using=using) for q in args
I wonder if the code should be using q.clone() (undocumented?) or even better, q.all() (which does the same as q.clone()), which supposedly makes a copy of the query?Oops, a Q object is not a query. It's a Q().I noticed this seems similar to issue #524 that originates at the same line of code.
The text was updated successfully, but these errors were encountered: