# Suppressing automatic display(::Makie.Scene) in the REPL

**URL:** <https://discourse.julialang.org/t/suppressing-automatic-display-makie-scene-in-the-repl/103543>\
**Category:** Visualization\
**Tags:** repl, vscode, makie\
**Created:** [September 5, 2023, 1:06pm UTC](https://discourse.julialang.org/t/suppressing-automatic-display-makie-scene-in-the-repl/103543 "2023-09-05T13:06:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![airpmb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/airpmb/32/7826_2.png) [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Post date:** [September 5, 2023, 1:06pm UTC](https://discourse.julialang.org/t/suppressing-automatic-display-makie-scene-in-the-repl/103543/1 "2023-09-05T13:06:43Z")

</div>

A common occurrence when I’m working on Makie stuff at the REPL:

```julia
julia> foo = some_function_that_returns_a_scene()
Error showing value of type Makie.Scene:
ERROR: AssertionError: internal error. Scene already displayed by screen but not as root scene

```

This happens to be with GLMakie and in the VS Code REPL but I think something similar can happen with other backends and just at a plain terminal.

Is there some way to turn off this behavior? What I really want here is for the REPL to just print out a description of the `Scene`, i.e. something like:

```julia
julia> println(repr(foo))
Scene (1000px, 1000px):
  1 Plot:
    └ MakieCore.Combined{Makie.tooltip, Tuple{GeometryBasics.Point{2, Float32}}}
  0 Child Scenes

```

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [September 23, 2023, 6:50pm UTC](https://discourse.julialang.org/t/suppressing-automatic-display-makie-scene-in-the-repl/103543/2 "2023-09-23T18:50:58Z")

</div>

Do you have a complete example that triggers this error for you? Just to understand what you’re doing, irrespective of the error message and what could be done about that.

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [September 23, 2023, 7:54pm UTC](https://discourse.julialang.org/t/suppressing-automatic-display-makie-scene-in-the-repl/103543/3 "2023-09-23T19:54:57Z")

</div>

To remove the error, at least, have you tried `;` at the end of the statement, like

```julia
julia> foo = some_function_that_returns_a_scene();

```

?

---

<div class="post-metadata">

**Author:** ![airpmb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/airpmb/32/7826_2.png) [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Post date:** [September 24, 2023, 3:29pm UTC](https://discourse.julialang.org/t/suppressing-automatic-display-makie-scene-in-the-repl/103543/4 "2023-09-24T15:29:26Z")

</div>

Sure, just something as simple as e.g.

```julia
using Makie
using GLMakie
f = Figure() # opens a window, OK
s = Scene(f.scene) # throws the AssertionError

```

Yes, a trailing semicolon of course suppresses this but it’s easy to forget and in general I never want to implicitly `display`, but I often want to see the `repr` while doing exploratory work.
