# script generated with trace doesn't work with pvbatch

**URL:** https://discourse.paraview.org/t/script-generated-with-trace-doesnt-work-with-pvbatch/7735
**Category:** ParaView Support
**Created:** [August 1, 2021, 5:58pm UTC](https://discourse.paraview.org/t/script-generated-with-trace-doesnt-work-with-pvbatch/7735 "2021-08-01T17:58:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hopitigala](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/h/838e76/32.png) [@hopitigala](https://discourse.paraview.org/u/hopitigala)
#### Post date: [August 1, 2021, 5:58pm UTC](https://discourse.paraview.org/t/script-generated-with-trace-doesnt-work-with-pvbatch/7735/1 "2021-08-01T17:58:35Z")

</div>

[xz\_animation\_vortmag\_vtk\_series\_batch.py](https://discourse.paraview.org/uploads/short-url/czidNHtx6vay3JlhfdNyhtPSV8I.py) (6.7 KB)  
Attached is a file generated using paraview trace utility. The scripts runs without any error when runscript is used in gui. However, the script fails when pvbatch command is used. It give the following error.

Traceback (most recent call last):  
File “/mnt/sdb/Research/GATS/MURI/cases/GW20/paraview\_macros/xz\_animation\_vortmag\_vtk\_series\_batch.py”, line 139, in   
layout1.SetSize(914, 695)  
AttributeError: ‘NoneType’ object has no attribute ‘SetSize’

Can anyone help me with this?

---

<div class="post-metadata">

### Author: ![GeoUge](https://discourse.paraview.org/user_avatar/discourse.paraview.org/geouge/32/11913_2.png) [@GeoUge](https://discourse.paraview.org/u/GeoUge)
#### Post date: [March 17, 2023, 1:04pm UTC](https://discourse.paraview.org/t/script-generated-with-trace-doesnt-work-with-pvbatch/7735/2 "2023-03-17T13:04:38Z")

</div>

Hello, I have the same problem, were you able to solve it? Thanks

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [March 17, 2023, 4:52pm UTC](https://discourse.paraview.org/t/script-generated-with-trace-doesnt-work-with-pvbatch/7735/3 "2023-03-17T16:52:22Z")

</div>

Without really digging into it, my guess is that you need to recreate your script. In theory older scripts run with newer versions of ParaView, but in practice I have seen it be problematic. I believe this was true after 5.9.1. You can read which version of ParaView created the script at the top.
