# Reading xdmf file using pvpython

**URL:** https://discourse.paraview.org/t/reading-xdmf-file-using-pvpython/4440
**Category:** ParaView Support
**Tags:** python
**Created:** [May 28, 2020, 1:08pm UTC](https://discourse.paraview.org/t/reading-xdmf-file-using-pvpython/4440 "2020-05-28T13:08:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Saurabh](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@Saurabh](https://discourse.paraview.org/u/Saurabh)
#### Post date: [May 28, 2020, 1:08pm UTC](https://discourse.paraview.org/t/reading-xdmf-file-using-pvpython/4440/1 "2020-05-28T13:08:03Z")

</div>

Hii all, I am new to paraview pvpython interface, and I am having trouble reading xdmf file from pvpython interface. This documentation: [https://kitware.github.io/paraview-docs/latest/python/paraview.simple.XDMFReader.html](https://kitware.github.io/paraview-docs/latest/python/paraview.simple.XDMFReader.html) is not coming to rescue.

The format in which I am trying:

import paraview  
file = paraview.simple.XDMFReader(r’C:\Users\Saurabh\Desktop\0001.xdmf’)

The error message says: **RuntimeError** , exact message copy-pasted below for reference

Traceback (most recent call last):  
File “”, line 1, in   
File “D:\Softwares\ParaView-5.8.0-Windows-Python3.7-msvc2015-64bit\ParaView-5.8.0-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\simple.py”, line 2245, in CreateObject  
raise RuntimeError (“This function does not accept non-keyword arguments.”)  
RuntimeError: This function does not accept non-keyword arguments.

Any help will be highly appreciated

Thanks

Saurabh

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [May 28, 2020, 1:48pm UTC](https://discourse.paraview.org/t/reading-xdmf-file-using-pvpython/4440/2 "2020-05-28T13:48:09Z")

</div>

> [@Saurabh](#):
>
> file = paraview.simple.XDMFReader(r’C:\Users\Saurabh\Desktop\0001.xdmf’)

Change this to

`file = paraview.simple.XDMFReader(FileNames=[r’C:\Users\Saurabh\Desktop\0001.xdmf’])`

---

<div class="post-metadata">

### Author: ![Saurabh](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@Saurabh](https://discourse.paraview.org/u/Saurabh)
#### Post date: [May 28, 2020, 3:03pm UTC](https://discourse.paraview.org/t/reading-xdmf-file-using-pvpython/4440/3 "2020-05-28T15:03:19Z")

</div>

Thanks for the help @cory.quammen. It works. Just a small modification required, instead of “FileName”, it is coded with “FileNames”.

Appreciate such a quick response. It really helps a lot.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [May 28, 2020, 4:13pm UTC](https://discourse.paraview.org/t/reading-xdmf-file-using-pvpython/4440/4 "2020-05-28T16:13:53Z")

</div>

Oops, sorry about the typo. Glad you figured it out.

---

<div class="post-metadata">

### Author: ![Saurabh](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@Saurabh](https://discourse.paraview.org/u/Saurabh)
#### Post date: [May 28, 2020, 5:00pm UTC](https://discourse.paraview.org/t/reading-xdmf-file-using-pvpython/4440/5 "2020-05-28T17:00:09Z")

</div>

Thanks. Got reference from the documentation section, they are really well documented. But as a next level of improvement, it would really be great if they can be complemented with some examples as well, in coming times.
