-
Notifications
You must be signed in to change notification settings - Fork 44
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 Language
object with v2.0.1
#199
Comments
v2.0.1
Language
object with v2.0.1
Pickling does not work out-of-the-box anymore because you are dealing with a Rust object now, not a Python enum. Pickle support with PyO3 is possible but complicated, that's why I have left it out so far until people start to complain which happened quicker now than I expected. Why do you need pickle support in the first place? If you are using the |
Thanks for the explanation. I'm using a framework that pickles its settings and one of the settings happened to be a Thanks for a nice library! |
You are welcome. It's good that you have opened this issue. I will try to implement pickle support for the next major release as it is definitely useful to have. |
I would like to see this issue cause we're looking to implement something that doesn't block an async event loop. So we get this same error when trying to put it into a ProcessPoolExecutor. Looking forward to having this ASAP! Thanks a lot and great work! |
We came across the same problem in combination with supplying a parameter based on lingua.Languages to @pemistahl A similar error occurs if one wants to use normal enum conversion:
Should I open another one for this? |
@DanielHabenicht I will fix these errors shortly. I'm currently preparing a new major release 1.4.0 for the pure Python edition of the library. After this is done, I will concentrate on the Rust edition again. Thanks for your patience everyone. With more kids and less time than last year, further development of my projects has slowed down but not stopped. |
After switching to
v2.0.1
fromv1.3.4
I'm facingTypeError: cannot pickle 'builtins.Language' object
when running something along the lines ofI've checked it with Python 3.10 and Python 3.11.
Am I missing something?
The text was updated successfully, but these errors were encountered: