# AttributeError: 'vtkPythonStdStreamCaptureHelper' object has no attribute 'fileno'

**URL:** https://discourse.paraview.org/t/attributeerror-vtkpythonstdstreamcapturehelper-object-has-no-attribute-fileno/15614
**Category:** ParaView Support
**Tags:** vtk
**Created:** [October 22, 2024, 9:19pm UTC](https://discourse.paraview.org/t/attributeerror-vtkpythonstdstreamcapturehelper-object-has-no-attribute-fileno/15614 "2024-10-22T21:19:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![MengjiaoH](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mengjiaoh/32/15421_2.png) [@MengjiaoH](https://discourse.paraview.org/u/MengjiaoH)
#### Post date: [October 22, 2024, 9:19pm UTC](https://discourse.paraview.org/t/attributeerror-vtkpythonstdstreamcapturehelper-object-has-no-attribute-fileno/15614/1 "2024-10-22T21:19:32Z")

</div>

I have a Python script that imports `genericIO` ([hacc / GenericIO · GitLab](https://git.cels.anl.gov/hacc/genericio)) and uses its functions. The code runs successfully with standard Python, but I would like to incorporate functions from ParaView, which requires me to run the script with `pvpython`.

However, when I execute the script using `pvpython`, I encounter the following error:

```auto
AttributeError: 'vtkPythonStdStreamCaptureHelper' object has no attribute 'fileno'

```

I’m wondering if anyone knows the cause of this error and how to fix it. Could it be related to a version mismatch between the VTK used by `genericIO` and the one used by ParaView?

Any insights would be greatly appreciated!

---

<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: [October 23, 2024, 8:57am UTC](https://discourse.paraview.org/t/attributeerror-vtkpythonstdstreamcapturehelper-object-has-no-attribute-fileno/15614/2 "2024-10-23T08:57:57Z")

</div>

> [@MengjiaoH](#):
>
> I have a Python script

Please share your script

---

<div class="post-metadata">

### Author: ![MengjiaoH](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mengjiaoh/32/15421_2.png) [@MengjiaoH](https://discourse.paraview.org/u/MengjiaoH)
#### Post date: [October 25, 2024, 9:37pm UTC](https://discourse.paraview.org/t/attributeerror-vtkpythonstdstreamcapturehelper-object-has-no-attribute-fileno/15614/3 "2024-10-25T21:37:35Z")

</div>

The script is as following:

```auto
import sys 
import faulthandler
import sys 
sys.path.append("/vast/home/mhan/externals/genericio/legacy_python")
import genericio as gio
from paraview.simple import *

if __name__ == " __main__":
    inputfilename = "m000p-247.haloproperties" # genericIO format
    print("inputfilename", inputfilename)
    faulthandler.enable()
    gio.inspect_gio(inputfilename)

```

It uses genericIO library. But using ./pvpython to execute it raised seg fault.

Thank you.

---

<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: [October 28, 2024, 6:12am UTC](https://discourse.paraview.org/t/attributeerror-vtkpythonstdstreamcapturehelper-object-has-no-attribute-fileno/15614/4 "2024-10-28T06:12:01Z")

</div>

what happens if you comment out `from paraview.simple import *` ?

---

<div class="post-metadata">

### Author: ![MengjiaoH](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mengjiaoh/32/15421_2.png) [@MengjiaoH](https://discourse.paraview.org/u/MengjiaoH)
#### Post date: [October 28, 2024, 5:25pm UTC](https://discourse.paraview.org/t/attributeerror-vtkpythonstdstreamcapturehelper-object-has-no-attribute-fileno/15614/5 "2024-10-28T17:25:29Z")

</div>

The same error occurs even if I comment out the line `from paraview.simple import *` .  
The error appears when I run the script using pvpython.  
Thanks!

---

<div class="post-metadata">

### Author: ![EthanStam](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ethanstam/32/2521_2.png) [@EthanStam](https://discourse.paraview.org/u/EthanStam)
#### Post date: [October 30, 2024, 6:55pm UTC](https://discourse.paraview.org/t/attributeerror-vtkpythonstdstreamcapturehelper-object-has-no-attribute-fileno/15614/6 "2024-10-30T18:55:43Z")

</div>

@MengjiaoH I got the script running on my end, up until it tries to load the data. I don’t have the data which is ok. I can reproduce the error.

For me, the error occurs on `faulthandler.enable()`. Can you try commenting out that line keeping the rest the same?
