The new version of root breaks a few things with strings when the python interface is used. Principally, when using python to do something like this, with say RDataFrame:
for x in dataframe.GetColumnNames():
if "Jet_" in x:
print(x)
print(dataframe.GetColumnType(x))
it will ‘silently fail,’ because the iterable returned now is of type “<class cppyy.gbl.std.string at 0x7504dd0>”. This is probably worse than the other place where this crops up in my own code, which is when constructing a TChain using filenames stored in a ROOT.std.vector. Upon calling .Add(filename), it fails with
TypeError: 'none of the 2 overloaded methods succeeded. Full details:
int TChain::Add(TChain* chain) =>
... =>
TypeError: could not convert argument 1 (expected string or Unicode object, string found)'
Which is a rather annoying failure message.
The workaround is to call str() on the iterable, but I don’t know if the current behavior is really ideal or acknowledged as a necessary tradeoff, so I’m reporting it here.
Best,
Nick
ROOT Version: 6.22/00
Platform: CentOS 7
Compiler: gcc800
Software Stack: LCG_98