# Render() causes a non responding Visualization Toolkit - Win32OpenGL on Windows

**URL:** https://discourse.paraview.org/t/render-causes-a-non-responding-visualization-toolkit-win32opengl-on-windows/538
**Category:** ParaView Support
**Tags:** python
**Created:** [September 6, 2018, 10:28pm UTC](https://discourse.paraview.org/t/render-causes-a-non-responding-visualization-toolkit-win32opengl-on-windows/538 "2018-09-06T22:28:46Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![foadsf](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/e68b1a/32.png) [@foadsf](https://discourse.paraview.org/u/foadsf)
#### Post date: [September 6, 2018, 10:28pm UTC](https://discourse.paraview.org/t/render-causes-a-non-responding-visualization-toolkit-win32opengl-on-windows/538/1 "2018-09-06T22:28:46Z")

</div>

Following [this issue](https://discourse.paraview.org/t/not-able-to-import-paraview-simple-module-on-windows/537) I’m trying to render the cone example. The sequence of commands:

```
from paraview.simple import *
cone = Cone()
Show(cone)
Render()

```

It opens a nonresponsive window:

 ![python2_2018-09-07_00-25-15](https://discourse.paraview.org/uploads/default/original/1X/a128f0fc9c6f3da5c8f62854d35c707c505ea2ff.png)

which shows non responding in the task manager too:

 ![2018-09-07_00-17-19](https://discourse.paraview.org/uploads/default/original/1X/22d484ed918ebdae3cffad87d7750988cd9b2845.png)

My version of Python is:

> Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] on win32

and I’m on Windows 10 64-bit. I would appreciate if you could help me solve this issue.

**P.S.1.** I reported an issue [here in the ParaView repo](https://gitlab.kitware.com/paraview/paraview/issues/18426), hopefully it will be resolved soon.

**P.S.2.** I also reported the issue [here in the VTK Users mailing list](https://public.kitware.com/pipermail/vtkusers/2018-September/102639.html).

**P.S.3** I also asked the question [here on StackOverflow](https://stackoverflow.com/questions/52213973/paraview-python-script-causes-non-responding-visualization-toolkit-win32opengl).

---

<div class="post-metadata">

### Author: ![foadsf](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/e68b1a/32.png) [@foadsf](https://discourse.paraview.org/u/foadsf)
#### Post date: [September 6, 2018, 11:47pm UTC](https://discourse.paraview.org/t/render-causes-a-non-responding-visualization-toolkit-win32opengl-on-windows/538/2 "2018-09-06T23:47:57Z")

</div>

Ok, So far from [here](https://groups.google.com/forum/#!topic/vmtk-users/MqlnSy4VMsc) I have realised that the issue above seems to be due to the 64bit Python version installed. So I uninstalled it and installed the 32bit version. Now when I try to run the command `from paraview.simple import *` I get the error:

> Error: Could not import vtkCommonComputationalGeometry  
> Traceback (most recent call last):  
> File “”, line 1, in   
> File “C:\Program Files\ParaView 5.4.1-822-g597adef-Qt5-Windows-64bit\bin\Lib\site-packages\paraview\simple.py”, line 41, in   
> from paraview import servermanager  
> File “C:\Program Files\ParaView 5.4.1-822-g597adef-Qt5-Windows-64bit\bin\Lib\site-packages\paraview\servermanager.py”, line 53, in   
> from paraview import vtk  
> File “C:\Program Files\ParaView 5.4.1-822-g597adef-Qt5-Windows-64bit\bin\Lib\site-packages\paraview\vtk\__init_\_.py”, line 7, in   
> from paraview.vtk.vtkCommonCore import \*  
> File “C:\Program Files\ParaView 5.4.1-822-g597adef-Qt5-Windows-64bit\bin\Lib\site-packages\paraview\vtk\vtkCommonCore.py”, line 9, in   
> from vtkCommonCorePython import \*  
> ImportError: No module named vtkCommonCorePython

Which has also been reported [here](https://stackoverflow.com/questions/52194800/paraview-in-jupyter-notebook-for-openfoam-no-module-named-vtkcommoncorepython). From [here](http://vtk.1045678.n5.nabble.com/ImportError-No-module-named-vtkCommonCorePython-td5730504.html) it seems that it can’t find the `vtkCommonCorePython` which is in the folder:

```
 C:\Program Files\ParaView 5.4.1-822-g597adef-Qt5-Windows-64bit\bin\Lib\site-packages\vtk

```

However when adding this path to the PYTHONPATH as described [here](https://discourse.paraview.org/t/not-able-to-import-paraview-simple-module-on-windows/537/9) I get the new error:

> ImportError: DLL load failed: %1 is not a valid Win32 application.

The exact error has been also reported [here](https://stackoverflow.com/questions/31883557/how-do-i-use-liclipse-to-write-a-paraview-script). [This post](https://stackoverflow.com/questions/4676433/solving-dll-load-failed-1-is-not-a-valid-win32-application-for-pygame) says that this might happen because my ParaView version is 64bit. I looked for a 32 bit version of paraview but didn’t find any 😥

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [September 7, 2018, 2:04am UTC](https://discourse.paraview.org/t/render-causes-a-non-responding-visualization-toolkit-win32opengl-on-windows/538/3 "2018-09-07T02:04:31Z")

</div>

The render window is not expected to be interactive when using ParaView’s Python scripting. One important exception is if you are executing Python scripts in `paraview.exe` - in that case the RenderView is interactive.

ParaView and all supporting libraries are 64-bit. It will work only with the 64-bit Python installation. There is no need for 32-bit anything. But as I mentioned [here](https://discourse.paraview.org/t/not-able-to-import-paraview-simple-module-on-windows/537/10?u=cory.quammen), `pvpython.exe` may be your best bet.

---

<div class="post-metadata">

### Author: ![foadsf](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/e68b1a/32.png) [@foadsf](https://discourse.paraview.org/u/foadsf)
#### Post date: [September 7, 2018, 2:07am UTC](https://discourse.paraview.org/t/render-causes-a-non-responding-visualization-toolkit-win32opengl-on-windows/538/4 "2018-09-07T02:07:57Z")

</div>

So the non responding window is expected? Doesn’t seem like a normal behaviour to me. It is ok if it not interactive but still you should be able to move the window and resize it …

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [September 7, 2018, 2:17am UTC](https://discourse.paraview.org/t/render-causes-a-non-responding-visualization-toolkit-win32opengl-on-windows/538/5 "2018-09-07T02:17:09Z")

</div>

Using ParaView through Python is usually meant for batch generation of images that are saved to files. For such uses, the window is incidental and disappears when the python executable terminates, so the fact that it is not movable has not been enough of an issue to address. To resize the window, use the Python commands

```python
v = GetActiveView()
v.ViewSize=[500,500] # [width,height]
Render()

```

---

<div class="post-metadata">

### Author: ![foadsf](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/e68b1a/32.png) [@foadsf](https://discourse.paraview.org/u/foadsf)
#### Post date: [September 7, 2018, 2:39am UTC](https://discourse.paraview.org/t/render-causes-a-non-responding-visualization-toolkit-win32opengl-on-windows/538/6 "2018-09-07T02:39:28Z")

</div>

I tried this on my mac using the `pvpython` as suggested [here](https://discourse.paraview.org/t/not-able-to-import-paraview-simple-module-on-windows/537/13?u=foadsf) . Although it is possible to move the window here, It is non responding here too.

---

<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 7, 2018, 9:11am UTC](https://discourse.paraview.org/t/render-causes-a-non-responding-visualization-toolkit-win32opengl-on-windows/538/7 "2018-09-07T09:11:55Z")

</div>

Just use `Interact()` instead of `Render()`

eg:

```auto
>>> from paraview.simple import *
>>> Cone()
<paraview.servermanager.Cone object at 0x7f30cc989c90>
>>> Show()
<paraview.servermanager.GeometryRepresentation object at 0x7f30cc989d90>
>>> Interact()

```

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [September 7, 2018, 1:11pm UTC](https://discourse.paraview.org/t/render-causes-a-non-responding-visualization-toolkit-win32opengl-on-windows/538/8 "2018-09-07T13:11:08Z")

</div>

> [@mwestphal](#):
>
> Just use `Interact()` instead of `Render()`

Brilliant! I obviously didn’t know about that function. 🤦‍♂️

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [September 7, 2018, 1:35pm UTC](https://discourse.paraview.org/t/render-causes-a-non-responding-visualization-toolkit-win32opengl-on-windows/538/9 "2018-09-07T13:35:34Z")

</div>

> [@cory.quammen](#):
>
> Brilliant! I obviously didn’t know about that function. 🤦‍♂️

[https://blog.kitware.com/interacting-with-views-in-paraview-python-pvpython/](https://blog.kitware.com/interacting-with-views-in-paraview-python-pvpython/)
