[BUG?] python: cannot pickle ROOT.Long() (not found as ROOT.long)


I am having problems serializing a class instance which uses a variable of type ROOT.Long. A MWE reproducing the problem in an interactive python shell is:

import ROOT
import pickle
pickle.dump(ROOT.Long(), open('test.pkl', 'wb'), protocol=2)

which results in:

PicklingError: Can't pickle <type 'ROOT.long'>: it's not found as ROOT.long

Why is this? Can it have something to do with the Long / long name mismatch?
I would be grateful for any suggestion!


Hi Elena. It is bug and I have open a JIRA ticket ROOT-8811
Cheers, Pere

A [fix] (https://github.com/root-project/root/commit/87454109a191a6d909b7ce3070984a73df08916f) has committed to master, 6.08 and 6.10 branches.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.