TFile PyROOT: TypeError: none of the 2 overloaded methods succeeded

I get the above mentioned error while trying to open a file:

ff=TFile('blah.root', 'recreate')
ff.close()

same happens with the with style. A similar issue has been posted here. There it seems that the problem would be solved by upgrading to version 6.24. I have now version 6.26 so I am not sure whether there is a workaround for this.

many thanks!


_ROOT Version: 6.26/10
_Platform: macosxarm64
_Compiler: PyROOT


May be try:

import ROOT
...
ff = ROOT.TFile('blah.root', 'recreate')

Can you please provide explanation why this works? In the past it used to work without ROOT. at the beginning.

Try: from ROOT import TFile

I am not a Python expert, therefore as it is explained that way in the documentation, that’s how I am using it.

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