RooWorkspace::factory error after switching to ROOT6.20

ROOT Version: 6.20

Dear experts,
I’ve switched my python project that is build on top of ROOT from ROOT6.18 to ROOT6.20 and now I get a weird error while running my code:

Traceback (most recent call last):
  File "fit/", line 595, in <module>
  File "fit/", line 112, in fit
    pdfBuild = Bs2JpsiPhiRun2_PdfBuilder(**pdfConfig)
  File "/user/egovorko/p2vv/standalone/python/P2VV/Parameterizations/", line 1579, in __init__
    self['pdf'] = self._createSimultaneous()
  File "/user/egovorko/p2vv/standalone/python/P2VV/Parameterizations/", line 1789, in _createSimultaneous
    , SplitParameters = [ pars[0] for pars in splitPars if "dummy" not in pars[0][0].GetName() ] )
  File "/user/egovorko/p2vv/standalone/python/P2VV/", line 1275, in __init__
  File "/user/egovorko/p2vv/standalone/python/P2VV/", line 167, in _declare
    x = self._factory(spec)
  File "/user/egovorko/p2vv/standalone/python/P2VV/", line 81, in _factory
TypeError: none of the 2 overloaded methods succeeded. Full details:
  RooFactoryWSTool& RooWorkspace::factory() =>
    takes at most 0 arguments (1 given)
  RooAbsArg* RooWorkspace::factory(const char* expr) =>
    Unexpected character in brace expression. (C++ exception of type regex_error)

it seem to point to spec variables that has "Unexpected character in brace expression. ", however spec looks completely fine:


I read the release notes throughout to try to understand the causes, but haven’t found anything so far. Any suggestions are very appreciated. Thanks .

That’s interesting. I would like to run this, but like this

  1 import ROOT
  3 w = ROOT.RooWorkspace("ws")
  4 w.factory("SIMCLONE::FitConfig_sig_t_angles_simul(FitConfig_sig_t_angles,$SplitParam({FitConfig_ASOddPhase,FitConfig_C_SP,FitConfig_f_S},{KKMassCat}),$SplitParam({FitConfig_effC_000,FitConfig_effC_020,FitConfig_effC_021,FitConfig_effC_022,FitConfig_effC_02m1,FitConfig_effC_02m2,FitConfig_effC_100,FitConfig_effC_121,FitConfig_effC_12m1,FitConfig_effC_200,FitConfig_sf_placeholder},{hlt1b,year}))")

I cannot reproduce the problem. I could imagine that the $ signs throw off a regexp-parser, but I wouldn’t know where user inputs get passed into regular expressions.

Stephan, thanks a lot for taking a look.

I could imagine that the $ signs throw off a regexp-parser, but I wouldn’t know where user inputs get passed into regular expressions.

Is there any additional information that I could provide here? Thanks.

My colleague reported that he sees similar error with ROOT6.20 and Pyhton 3. He says however that with Python 2, the problem disappears.

You could provide an example script to run. :slight_smile:

To clarify a bit: I cannot reproduce the problem, because my minimal script above errors out with

[#0] ERROR:ObjectHandling -- RooSimWSTool::build() ERROR: associated workspace ws does not contain a pdf named FitConfig_sig_t_angles

That obviously happens since there’s nothing in the workspace. If I had to re-engineer such a kind of workspace now, that would take way too much time. What could work is that you send/attach the workspace before the factory(spec) call, and then I run my minimal reproducer on this.

Sorry for the delay with replay, Stephan. I’m working on making such a script, but it seems very complicated given that there are A LOT of code that in the ends generates this FitConfig_sig_t_angles_simul :sob:

I’ll try to come up with something easily reproducible (and not 5k lines in python…).

Also, I had a look at this RooFit tutorial that uses SIMCLONE and factory() and I tried to mimic my issue, but no errors arise. That makes me think that regex_error is not the real issue

Oh, wow. :slight_smile:
You could try to save the file directly before things fail, and also print the entire string.

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