TGraph->Fit: "S" option not working?

I’m trying to use the S option to retrieve the correlation coefficient from a linear fit, but the TFitResult thing seems not to be working.

I’m using Python, with ROOT 5.25, here’s the relevant part of the code:

from ROOT import TH1I, TCanvas, TGraph, TGraphErrors, TF1 [...] intensity_graph = TGraphErrors(file_name) line = TF1("line", "pol1") result = intensity_graph.Fit("line","S") result.Print("V") ... ... result.Print("V") AttributeError: 'int' object has no attribute 'Print'

it seems that the pointer to the fit result is being converted to an int, despite the “s” option

TFitResult was implemented only in version 5.26

Rene