The problem about opening file with pyroot

Hi,dear experts,
When i open file with a link using pyroot, there comes one problem. It seems to due to the root version and I don’t know how to deal with it. Could you give some advice? Thanks.

>>> import ROOT
>>> ROOT.TFile.Open("root://")
python: symbol lookup error: /cvmfs/ undefined symbol: _ZN5XrdCl3URLC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

Welcome to the ROOT forum.

To identify if it is a ROOT issue or a pyROOT one can you try to open that file using the C++ interface ?

root [0] TFile *f = TFile::Open("root://");

Hi,the result shows this is root issue.

root [0] TFile *f = TFile::Open("root://");
/cvmfs/ symbol lookup error: /cvmfs/ undefined symbol: _ZN5XrdCl3URLC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

It does not seems to find the file. Either the file does not exist or the syntax you are using is wrong. @pcanal will know.

The symbol that is not found is:

$ echo _ZN5XrdCl3URLC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE | c++filt 
XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)

I.e. Most likely than not there version of ROOT and the version of XRootD available in your environment are not compatible.

Hi, thanks for your reply. How can I do to change the version of xrootd in lxplus?
This is the version of the xrootd the environment set. Maybe i need to change it to v4?

xrootd -v

I am not sure. It depends on where you got your version of ROOT. If you got it from the ATLAS software distribution, that is where you ought to look for xrootd.

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