# Python shell freezes but not pvpython

**URL:** https://discourse.paraview.org/t/python-shell-freezes-but-not-pvpython/3453
**Category:** ParaView Support
**Tags:** python
**Created:** [January 29, 2020, 8:56pm UTC](https://discourse.paraview.org/t/python-shell-freezes-but-not-pvpython/3453 "2020-01-29T20:56:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Mohammed\_Fuad\_Choudh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mohammed_fuad_choudh/32/2802_2.png) [@Mohammed\_Fuad\_Choudh](https://discourse.paraview.org/u/Mohammed_Fuad_Choudh)
#### Post date: [January 29, 2020, 8:56pm UTC](https://discourse.paraview.org/t/python-shell-freezes-but-not-pvpython/3453/1 "2020-01-29T20:56:47Z")

</div>

Hello,

I am trying to create a script to automate some simulation calculations which would then be applied using the Calculator() filter in Paraview on my objects. The issue I’m having is that for some reason those codes, when run in the python shell causes paraview to freeze (Paraview isn’t responding). However when I run those same codes on pvpython they run without a hitch. How can I solve this issue? Other simpler scripts like making cubes or print a string don’t cause any issue.

I’m using Windows 10, Paraview 5.7.0. The simulation calculations are done with Cantera framework.

Thanks

Update, got this error message:

```
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Users\z004453p\AppData\Roaming\Python\Python37\site-packages\CRN_test.py", line 15, in <module>
    class CRN:
  File "C:\Users\z004453p\AppData\Roaming\Python\Python37\site-packages\CRN_test.py", line 47, in CRN
    fuel = ct.Solution('ar31.mod.cti')
  File "interfaces\cython\cantera\base.pyx", line 29, in cantera._cantera._SolutionBase. __cinit__
  File "interfaces\cython\cantera\base.pyx", line 50, in cantera._cantera._SolutionBase._init_cti_xml
cantera._cantera.CanteraError: 
***********************************************************************
CanteraError thrown by ct2ctml_string:
Error executing python while converting input file:
Python command was: 'C:\UserData\z004453p\Documents\ParaView-5.7.0-Windows-Python3.7-msvc2015-64bit\bin\paraview.exe'
thread_buffer_t::get: wait for got_data failed
wait_result_t: timeout elapsed
[code 0x0000 ()]
***********************************************************************
```

---

<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: [January 30, 2020, 3:59am UTC](https://discourse.paraview.org/t/python-shell-freezes-but-not-pvpython/3453/2 "2020-01-30T03:59:54Z")

</div>

You may want to build ParaView with` VTK_NO_PYTHON_THREAD=OFF` and `VTK_PYTHON_FULL_THREADSAFE=ON`

---

<div class="post-metadata">

### Author: ![Mohammed\_Fuad\_Choudh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mohammed_fuad_choudh/32/2802_2.png) [@Mohammed\_Fuad\_Choudh](https://discourse.paraview.org/u/Mohammed_Fuad_Choudh)
#### Post date: [January 30, 2020, 8:17pm UTC](https://discourse.paraview.org/t/python-shell-freezes-but-not-pvpython/3453/3 "2020-01-30T20:17:25Z")

</div>

Thanks. Might take a while to see if it works because I’m stuck on using CMake and errors…

I didn’t find a field for `VTK_PYTHON_FULL_THREADSAFE=ON` so I just add it in right?  
And did you mean `VTK_NO_PYTHON_THREADS=OFF` (with an ‘S’ at the end)?

---

<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: [January 31, 2020, 3:56am UTC](https://discourse.paraview.org/t/python-shell-freezes-but-not-pvpython/3453/4 "2020-01-31T03:56:20Z")

</div>

> did you mean `VTK_NO_PYTHON_THREADS=OFF` (with an ‘S’ at the end)?

Yes, my bad

> I didn’t find a field for `VTK_PYTHON_FULL_THREADSAFE=ON` so I just add it in right?

It should appear once you set VTK\_NO\_PYTHON\_THREADS to OFF.

---

<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: [January 31, 2020, 3:57am UTC](https://discourse.paraview.org/t/python-shell-freezes-but-not-pvpython/3453/5 "2020-01-31T03:57:59Z")

</div>

[https://www.paraview.org/pipermail/paraview-developers/2016-September/004640.html](https://www.paraview.org/pipermail/paraview-developers/2016-September/004640.html)
