AttributeError: Failed to get attribute TPyDispatcher from ROOT


I’m trying this code here:
https://root.cern/doc/master/gui__ex_8py_source.html
and I get the following error message:

Traceback (most recent call last):
  File "test.py", line 35, in <module>
    m = ROOT.TPyDispatcher( MyDraw )
  File "/Users/dinardo/root/myBuild/lib/ROOT/_facade.py", line 163, in _fallback_getattr
    raise AttributeError("Failed to get attribute {} from ROOT".format(name))
AttributeError: Failed to get attribute TPyDispatcher from ROOT

I compiled root from source with the following options:
cmake -D roofit=ON -D minuit2=ON -D gsl_shared=ON -D Python3_ROOT_DIR=/Users/dinardo/Homebrew/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8 ../

Do you know how can I fix this?
Many thanks,

  • Mauro.

_ROOT Version: 6.22.0
_Platform: Mac OS 10.15.6
_Compiler: Apple clang version 11.0.3 (clang-1103.0.32.62)


Dear Mauro,

6.22 has a couple of issues with creating GUIs from Python, we are about to make a patch release 6.22/02 that will fix this problem that you report, so I’d ask you try that release when it is out. Sorry for the inconveniences!

Enric

Hi Enric,
ok, sounds good.
Many thanks.

  • Mauro.

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