# Graphical objects do not appear

**URL:** <https://root-forum.cern.ch/t/graphical-objects-do-not-appear/42196>\
**Category:** ROOT\
**Tags:** bug, python, root\
**Created:** [November 10, 2020, 9:24am UTC](https://root-forum.cern.ch/t/graphical-objects-do-not-appear/42196 "2020-11-10T09:24:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kot](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/k/e274bd/32.png) [@kot](https://root-forum.cern.ch/u/kot)\
**Post date:** [November 10, 2020, 9:24am UTC](https://root-forum.cern.ch/t/graphical-objects-do-not-appear/42196/1 "2020-11-10T09:24:57Z")

</div>

No graphical objects have appeared after their creation, for instance, TBrowser, TCanvas etc:

```auto
import ROOT
b = ROOT.TBrowser()
c = ROOT.TCanvas()

```

Such behaviour does not take place in the previous ROOT versions, in particular, in version `6.14.04` it works fine.

_ROOT Version:_ 6.22/02  
_Platform:_ CentOS Linux release 7.8.2003 (lxplus)  
_Compiler:_ GCC 4.8.5  
_Python_: 2.7.5

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [November 10, 2020, 10:10am UTC](https://root-forum.cern.ch/t/graphical-objects-do-not-appear/42196/2 "2020-11-10T10:10:02Z")

</div>

Hi @kot,  
does running the code with `python -i` (note the `-i`) solve the issue?  
What if you run those lines in the interactive interpreter rather than in a script? Also if you are on lxplus did you connect with `ssh -XY` to get X11 forwarding? Are there warnings or errors printed on screen?

Cheers,  
Enrico

---

<div class="post-metadata">

**Author:** ![kot](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/k/e274bd/32.png) [@kot](https://root-forum.cern.ch/u/kot)\
**Post date:** [November 10, 2020, 10:27am UTC](https://root-forum.cern.ch/t/graphical-objects-do-not-appear/42196/3 "2020-11-10T10:27:00Z")

</div>

Dear Enrico,

Thank you very much for the prompt response.

Python is run in an interactive mode, not as a script.  
I connect to lxplus via [MobaXterm](https://mobaxterm.mobatek.net/) with enabled X11-forwarding. Please note it works fine with `ROOT 6.14.04`.  
No warnings, either errors are thrown

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/2/9/299473818f0904116a5eb099b7d19f5a8c5b8e25.png)

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [November 10, 2020, 11:19am UTC](https://root-forum.cern.ch/t/graphical-objects-do-not-appear/42196/4 "2020-11-10T11:19:06Z")

</div>

The reason is probably that ROOT is running in batch mode (`ROOT.gROOT.IsBatch()` probably returns `True`).

I get the same result when using `6.14/08` from the LCG releases (`source /cvmfs/sft.cern.ch/lcg/views/LCG_94a/x86_64-centos7-gcc8-dbg/setup.sh`).

What is a working setup on current lxplus?

---

<div class="post-metadata">

**Author:** ![kot](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/k/e274bd/32.png) [@kot](https://root-forum.cern.ch/u/kot)\
**Post date:** [November 10, 2020, 11:23am UTC](https://root-forum.cern.ch/t/graphical-objects-do-not-appear/42196/6 "2020-11-10T11:23:50Z")

</div>

Dear Enrico,

Yes, you are right,  
`ROOT.gROOT.IsBatch()` returns `True`

---

<div class="post-metadata">

**Author:** ![kot](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/k/e274bd/32.png) [@kot](https://root-forum.cern.ch/u/kot)\
**Post date:** [November 10, 2020, 11:26am UTC](https://root-forum.cern.ch/t/graphical-objects-do-not-appear/42196/7 "2020-11-10T11:26:55Z")

</div>

Dear Enrico,

Setting Batch to False resolves issue: `ROOT.gROOT.SetBatch(False)`.  
Thank you very much!

Best regards,  
Alex

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [November 24, 2020, 11:26am UTC](https://root-forum.cern.ch/t/graphical-objects-do-not-appear/42196/8 "2020-11-24T11:26:57Z")

</div>

Closed on November 24, 2020, 11:26am UTC

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