Pyroot GUI - tutorial examples problems, 6.22.06

sorry for a probably stupid question. How to get GUI elements in tutorial/pyroot working?

First I have first found, I need to run with python3 -i ... - see here

But anyway, - every (but the first) button gives

enter "q" to quit: enter "q" to quit: Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'execfile' is not defined

Traceback (most recent call last):
  File "", line 51, in <module>
    window = pMyMainFrame( gClient.GetRoot(), 50, 50 )
  File "", line 25, in __init__
    self.fLabelDispatch = TPyDispatcher( self.DoSetlabel )
NameError: name 'TPyDispatcher' is not defined this one shows two buttons, but doesnt scale the content with the window.

I have seen there were some issues with the new pyroot in 6.22., I use the precompiled version, I see TPython in the code so I am not sure, where to start. I found some older discussions, but not too clear to me.
thread 1
thread 2
thread 3

Basically, I just want to have a menu left, canvas on right. I cannot catch-up with the examples. Might be my fault - I didn’t compile root this time and used the precompiled version for ubuntu 20.04.
Or, is that better/feasible to start with PySimpleGUI of Kivi instead and display a canvas in them somehow? (this happens to be a second question, actually).

Thank you,

ROOT Version: ROOT Version: 6.22/06
Built for linuxx8664gcc on Nov 27 2020, 15:14:08
From tags/v6-22-06@v6-22-06
Platform: ubuntu 20.04

Python 3.8.5

Hi Jaromir,

I can confirm the issues with and, but works fine for me. Some issues might have been fixed meanwhile, so could you try compiling from the github sources?

@etejedor @eguiraud Do you have any suggestions?


1 Like

this is one for Enric, our PyROOT expert – as he is off until the end of the month, it’s probably best to convert this thread to a GitHub issue so he can take a look when he’s back.

Sorry I cannot be of more help,

1 Like


@jaromrax You can follow these two issues.

1 Like

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