Error in <TApplication::GetOptions>: --web option not supported, ROOT should be built with at least c++14 enabled

While using the ROOT 6.18/04 with a simple python “” script:

import ROOT

one gets the error shown in the title of this thread when one tries:
./ --web="blah"

It seems that ROOT automatically tries to parse the script’s parameters.
How can I prevent it?
I would need some magic line, that will be executed as the first one in the script (right after “import ROOT”), which could block it (i.e., something that begins with “ROOT.gROOT...”).

Many thanks for pointing to the solution:

# before any ROOT call ...
# sys.argv = [] # ... either this (after one parsed all options oneself)
ROOT.PyConfig.IgnoreCommandLineOptions = True # ... or that

I hope the “ROOT.PyConfig.IgnoreCommandLineOptions” will not disappear in future ROOT versions, no matter what python binding will be used.

Note that as mentioned at the second link above the behavior changed with new PyROOT and IgnoreCommandLineOptions is now True by default, so in recent ROOT versions the surprising behavior is not present anymore.

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