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
use_dill does not work in Python 3.4 #5998
Comments
Sounds like a dill bug to me. Ping @mmckerns for any insight on any relevant changes in Python 3.4. What dill version? |
@minrk: thanks for thinking of me for obscure pickling errors. There are no changes that I've seen that impact python 3.4 vs 3.3. Only recent bugs/fixes were a fix of stdin/stdout handling on 5/28 and one other bug I introduced to the version prior (0.2), released 5/17… that was patched 5/19. Note both of the bugs (5/28) might be relevant… pipe --> StringIO, and the other (5/17) caused a conflict when import dill happened iff pickle was imported first. Both are fixed in the most recent version of dill (0.2.1) released 6/4. Aside from that, I could test most recent dill and ipython.parallel to see if it works, but I expect that you can also try that. I'm not seeing an error for that function using my async_map ('Pool.amap') functions with most recent dill and python3.4. I just ran it from a file, not the interpreter. Pickling works different for different ways the thing get run… so any help on how it was run would be good too. |
My not working dill version is 0.2.1, as installed from pip three days ago. |
I'm not having issues with my own map functions and with
It seems it might be a |
From zero:
And then I get the error above. |
Aha… so
I'll look into this. |
So, this is a new function in
Since it's new in 3.4, and I haven't seen it throw an error before -- I don't know what it does yet. But I don't like it.
but in 3.4 it's like this…
where the
Ok, so yuck. |
@minrk: does python3.4 does some weird stuff, and From
Then, magically, a lot of errors went away with pickling and python 3.4 |
I think IPython does hardcode HIGHEST_PROTOCOL. We should probably change this to DEFAULT_PROTOCOL, when defined. Thanks. |
Hey, and I finally learned how to use |
@minrk: I just looked into this to see if it'd be easy to generate a pull request for you, and I can confirm that's definitely the root cause. Everywhere you have
You'll probably have to do that too, since |
The default in Python 2 is protocol 0. Only in Python 3 is the default version 3. |
@takluyver: Ah… that's riiiiiight. It's |
Yeah, I think it should be DEFAULT_PROTOCOL if defined, and either 2 or 3 if it isn't. |
or HIGHEST |
@minrk: |
Makes sense. That should be what I've done in #6029. |
Hey guys, I had been using dill for several months in python 2.7.6 and we recently switched to 3.5.2. dill.dump is working just fine but dill.load gives an error similar to what was discussed here. Nothing has changed in the data or the code and this is basically what I am doing: dataset_rand = [train_set,valid_set,test_set] ...the error: Any ideas how to solve this? Thanks in advance! |
When executing a command like:
Every parallel operation outputs a long obscure pickle error:
The same works in 3.3.5
The text was updated successfully, but these errors were encountered: