Skip to content

Instantly share code, notes, and snippets.

@VanyaBelyaev
Created September 17, 2020 09:01
Show Gist options
  • Save VanyaBelyaev/278074969f2f940f180885be35f04db9 to your computer and use it in GitHub Desktop.
Save VanyaBelyaev/278074969f2f940f180885be35f04db9 to your computer and use it in GitHub Desktop.
Broken serialization of ROOT objects with dill for Python3
from __future__ import print_function
import ROOT,dill,pickle, sys
print('ROOT version %s' % ROOT.gROOT.GetVersion() )
vi = sys.version_info
print('Python version %s.%s.%s' % ( vi.major, vi.minor, vi.micro ) )
print('dill version %s' % dill.__version__ )
h = ROOT.TH1D('h1','',10,0,1)
hh = dill.loads ( dill.dumps ( h ) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment