Python shell freezes but not pvpython

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 ()]
***********************************************************************

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

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)?

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.

https://www.paraview.org/pipermail/paraview-developers/2016-September/004640.html