# Not able to load OpenFOAM paraview reader PVFoamReader when using pvbatch or pvpython

**URL:** https://discourse.paraview.org/t/not-able-to-load-openfoam-paraview-reader-pvfoamreader-when-using-pvbatch-or-pvpython/248
**Category:** ParaView Support
**Created:** [June 28, 2018, 10:15am UTC](https://discourse.paraview.org/t/not-able-to-load-openfoam-paraview-reader-pvfoamreader-when-using-pvbatch-or-pvpython/248 "2018-06-28T10:15:30Z")
**Posts on this page:** 6
**Page:** 2

<div class="post-metadata">

### Author: ![Batuhan](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/4bbf92/32.png) [@Batuhan](https://discourse.paraview.org/u/Batuhan)
#### Post date: [November 19, 2018, 3:23pm UTC](https://discourse.paraview.org/t/not-able-to-load-openfoam-paraview-reader-pvfoamreader-when-using-pvbatch-or-pvpython/248/21 "2018-11-19T15:23:44Z")

</div>

So I created a `MyScriptFile.py` file with the help of trace option in Paraview. I can run them in pyhton shell in paraview but not when I want to use `pvphyton MyScriptFile.py` . So how can I automate this process if I must write the

`LD_PRELOAD=/opt/paraviewopenfoam54/lib/paraview-5.4/libvtkpqCore-pv5.4.so.1 /opt/paraviewopenfoam54/bin/pvpython` .

After pyhton interference opened I copied my script file inside of it and it works but like I said how can I use it in a way that I can run multiple times with a script?

Your help is very appreciated since I’m beginner. Thanks in advance.

---

<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: [November 19, 2018, 3:24pm UTC](https://discourse.paraview.org/t/not-able-to-load-openfoam-paraview-reader-pvfoamreader-when-using-pvbatch-or-pvpython/248/22 "2018-11-19T15:24:45Z")

</div>

```
LD_PRELOAD=/opt/paraviewopenfoam54/lib/paraview-5.4/libvtkpqCore-pv5.4.so.1 /opt/paraviewopenfoam54/bin/pvpython /path/to/MyScriptFile.py
```

---

<div class="post-metadata">

### Author: ![Batuhan](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/4bbf92/32.png) [@Batuhan](https://discourse.paraview.org/u/Batuhan)
#### Post date: [November 19, 2018, 3:32pm UTC](https://discourse.paraview.org/t/not-able-to-load-openfoam-paraview-reader-pvfoamreader-when-using-pvbatch-or-pvpython/248/23 "2018-11-19T15:32:47Z")

</div>

Thanks for your Help Mathieu. Now it works.

---

<div class="post-metadata">

### Author: ![bagbagwan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bagbagwan/32/1915_2.png) [@bagbagwan](https://discourse.paraview.org/u/bagbagwan)
#### Post date: [August 14, 2019, 2:16am UTC](https://discourse.paraview.org/t/not-able-to-load-openfoam-paraview-reader-pvfoamreader-when-using-pvbatch-or-pvpython/248/24 "2019-08-14T02:16:00Z")

</div>

Hello, mwestphal

I have same trouble in my case. It seems that your solution must be helpful. However, problem is that version of paraview I am using now is v5.6, not v5.4. I try to do it by just changing the number but it seems that there is some change on new version.

If possible, could you help me do this on new version of 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: [August 14, 2019, 7:56am UTC](https://discourse.paraview.org/t/not-able-to-load-openfoam-paraview-reader-pvfoamreader-when-using-pvbatch-or-pvpython/248/25 "2019-08-14T07:56:56Z")

</div>

please create you own post.

---

<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 14, 2019, 7:57am UTC](https://discourse.paraview.org/t/not-able-to-load-openfoam-paraview-reader-pvfoamreader-when-using-pvbatch-or-pvpython/248/26 "2019-08-14T07:57:00Z")

</div>



[Previous page](https://discourse.paraview.org/t/not-able-to-load-openfoam-paraview-reader-pvfoamreader-when-using-pvbatch-or-pvpython/248.md?page=1)
