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
dill 0.2.9 works for serialization of ROOT classes in python2, but fails for python3 #356
Comments
is there a chance for fix? |
Can you post the traceback, after doing |
Dear Mike,
|
This is the trace you get with I also note that there's this line:
which I believe corresponds to saving the globals (easier to tell if I can see the debug trace). That tells me it might be possible to use one of the alternate settings, specifically, |
Hi Mike,
|
and the script is: print ('VERSIONS: ROOT & PYTHON: ', ROOT.gROOT.GetVersion() , sys.version_info ) dill.detect.trace(True) h = ROOT.TH1D() print ( 'PICKLE:' ) print ( 'DILL:', dill.version ) print ( 'OK') |
Could you run the same script with debug settings for python2.7, as a comparison? |
This is for python 2.7
|
Oh, interesting. In python 2, |
Thank you, Mike With |
|
Hi Mike, I can only agree that |
Hi Mike, I have a minor update with newer version of dill 0.3.1,. but the problem is still here. The script: import ROOT print ('VERSIONS: ROOT & PYTHON: ', ROOT.gROOT.GetVersion() , sys.version_info ) dill.detect.trace(True) h = ROOT.TH1D() print ( 'PICKLE:' ) print ( 'DILL:', dill.version ) print ( 'OK') The output: [ibelyaev@lbcsrv01 build]$ python ./test_dill.py F2M1: <module 'libROOTPythonizations3_7' from '/cvmfs/sft-nightlies.cern.ch/lcg/views/dev3python3/Mon/x86_64-centos7-gcc9-opt/lib/libROOTPythonizations3_7.so'> F2D2: <dict object at 0x7fdfe360e460> T4D2: <dict object at 0x7fdff9a53aa0> T4D2: <dict object at 0x7fdff9a3caa0> D2D2B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3B3: B3TBufferFile::WriteObjectAny:0: RuntimeWarning: since TROOT has no public constructor T4D2M1B3OK This time I have a warning from ROOT: TBufferFile::WriteObjectAny:0: RuntimeWarning: since TROOT has no public constructor |
FYI this PR #382 fixes this issue:
With dill
|
@vepadulano: thanks for the update. I'll close this. If this issue is found to persist, then please post here and I'll reopen. |
With a great success I am using for my project ostap (https://github.com/OstapHEP/ostap) a nice pathos suite (pathos, multiprocess and ppft) together with ROOT project (https://github.com/root-project/root). It helps me a lot - thank you very much for this powerful tool! Everything works for me with python2( e.g. 2.7.16), but dill (0.2.9) fails with python3 (3.6.5).
Surprisingly, a plain pickle works for this case.
Is it a problem from the dill side?
The text was updated successfully, but these errors were encountered: