Skip to content
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

Knowit not suited for pickling #15

Closed
p0psicles opened this issue Sep 7, 2018 · 6 comments
Closed

Knowit not suited for pickling #15

p0psicles opened this issue Sep 7, 2018 · 6 comments

Comments

@p0psicles
Copy link

Hi @ratoaq2
I'm having issues dogpiling knowit results, because it has al kinds of non-pickable objects, like datetime, Quantity, etc.

I'm currenlty trying dogpile with msgpack writing my own encoders. But it's really a hassle.

What would be your approach here?

@p0psicles
Copy link
Author

One of the issues I have with the knowit results, is that the reporter is using different object reported by different providers. It would be really nice if this could be standardized. Any reason why this hasn't been done?

@ratoaq2
Copy link
Owner

ratoaq2 commented Feb 26, 2019

I still didn't get the different object reported by different providers

@p0psicles
Copy link
Author

Check this: https://github.com/pymedusa/Medusa/pull/5135/files#diff-8dae95e92447489197bc2654f723edaeR106. You see that I already encode a number of non-pickable object types. Like for example babelfish.Language and from pint.quantity import _Quantity. Those are not generic dogpile reported objects. Which I would expect. I would expect that for Quantity it would always use this: from knowit.properties import Language, Quantity. But that's not the case.

I didn't make these up. I had to add them by trial an error. And it worked to some degree.

Unfortunately, i'm digging into something else right now. And this didn't have a very high prio for me at the time.

@ratoaq2 ratoaq2 added this to the 0.3 milestone Mar 1, 2019
@ratoaq2 ratoaq2 removed this from the 0.3 milestone Jan 1, 2023
@ratoaq2
Copy link
Owner

ratoaq2 commented Jan 1, 2023

no_units is an option that's available since long time. That will get rid of pint Quantity

@ratoaq2
Copy link
Owner

ratoaq2 commented Jan 19, 2023

Fixed by c9b7177

@ratoaq2 ratoaq2 closed this as completed Jan 19, 2023
@p0psicles
Copy link
Author

Aah thx. Then we can start dogpile cache the knowit results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants