# Using a Skybox from Python script

**URL:** https://discourse.paraview.org/t/using-a-skybox-from-python-script/15328
**Category:** ParaView Support
**Tags:** python
**Created:** [August 30, 2024, 9:21am UTC](https://discourse.paraview.org/t/using-a-skybox-from-python-script/15328 "2024-08-30T09:21:34Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jfavre](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.paraview.org/u/jfavre)
#### Post date: [August 30, 2024, 9:21am UTC](https://discourse.paraview.org/t/using-a-skybox-from-python-script/15328/1 "2024-08-30T09:21:35Z")

</div>

I am not able to re-load a simple Python script with a Skybox background (ParaView 5.13). The following code always gives error, while it works fine loading the texture interactively

```auto
renderView1 = GetRenderView()

disk1 = Disk(registrationName='Disk1')
disk1.InnerRadius = 15.0
disk1.OuterRadius = 3000.0
disk1.CircumferentialResolution = 128

Show()

fname1 = "/local/apps/VTK/VTKBuild/ExternalData/Testing/Data/spiaggia_di_mondello_1k.hdr"
tex0 = CreateTexture(filename=fname1)

renderView1.BackgroundTexture = tex0
renderView1.UseColorPaletteForBackground = 0

renderView1.BackgroundColorMode = 'Skybox'
renderView1.ResetCamera()

```

vtkOpenGLTexture.cxx:195 ERR| vtkOpenGLTexture (0x5e467e8c2eb0): No scalar values found for texture input!

---

<div class="post-metadata">

### Author: ![sherin.sugathan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sherin.sugathan/32/15264_2.png) [@sherin.sugathan](https://discourse.paraview.org/u/sherin.sugathan)
#### Post date: [August 30, 2024, 11:56am UTC](https://discourse.paraview.org/t/using-a-skybox-from-python-script/15328/2 "2024-08-30T11:56:56Z")

</div>

For me, the code works in 5.12 and not in 5.13.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 30, 2024, 11:57am UTC](https://discourse.paraview.org/t/using-a-skybox-from-python-script/15328/3 "2024-08-30T11:57:09Z")

</div>

Hi @jfavre

I confirm the saving a python state file and then reloading it, either using pvpython or load state, causes the issue you are seeing.

I do not see anything wrong in the python code itself, it should work, so more investigation is needed as to why.

Could you open an issue ?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 30, 2024, 11:59am UTC](https://discourse.paraview.org/t/using-a-skybox-from-python-script/15328/4 "2024-08-30T11:59:13Z")

</div>

Indeed, this look like a regression.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 30, 2024, 11:59am UTC](https://discourse.paraview.org/t/using-a-skybox-from-python-script/15328/5 "2024-08-30T11:59:53Z")

</div>

@jaswantp

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jaswantp/32/11456_2.png) [@jaswantp](https://discourse.paraview.org/u/jaswantp)
#### Post date: [August 30, 2024, 12:34pm UTC](https://discourse.paraview.org/t/using-a-skybox-from-python-script/15328/6 "2024-08-30T12:34:12Z")

</div>

This is a regression likely due to [https://gitlab.kitware.com/paraview/paraview/-/commit/cca54429f9ee4323836568f6061d6a1605363f6b](https://gitlab.kitware.com/paraview/paraview/-/commit/cca54429f9ee4323836568f6061d6a1605363f6b). That commit was done as part of adding “Import GLTF” to ParaView.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 2, 2024, 7:46am UTC](https://discourse.paraview.org/t/using-a-skybox-from-python-script/15328/7 "2024-09-02T07:46:13Z")

</div>

For completeness: [https://gitlab.kitware.com/paraview/paraview/-/issues/22742](https://gitlab.kitware.com/paraview/paraview/-/issues/22742)
