I received this error message when attempting to use root_numpy’s array2tree with a structured numpy array.
ERROR:ROOT.TBranch.TBranch.WriteBasketImpl] basket’s WriteBuffer failed.
ERROR:ROOT.TBranch.TBranch.Fill] Failed to write out basket.
Traceback (most recent call last):
File “test.py”, line 7, in
events.ConstructPhysicalQuantities()
File “/home/sebastian/LocalAnalysis/GluexCodeGeneratorModule/TreeAnalysisModule/EventProcessorNumpy.py”, line 155, in ConstructPhysicalQuantities
array2tree(np.array(tree2array(t_events,branches=self.branchLists[‘MMSq’]), dtype = [(‘MMSq’, np.float64)]))#,tree=t_events)
File “/home/sebastian/.local/lib/python2.7/site-packages/root_numpy/_tree.py”, line 575, in array2tree
cobj = _librootnumpy.array2tree_toCObj(arr, name=name, tree=incobj)
File “/home/sebastian/.local/lib/python2.7/site-packages/root_numpy/_tree.py”, line 575, in array2tree
cobj = _librootnumpy.array2tree_toCObj(arr, name=name, tree=incobj)
File “/home/sebastian/.local/lib/python2.7/site-packages/rootpy/logger/magic.py”, line 247, in intercept_next_line
raise exception
rootpy.ROOTError: level=3000, loc=‘TBranch::TBranch::WriteBasketImpl’, msg='basket’s WriteBuffer failed.
Any advice on how I can fix this would be great.