Reading xdmf file using pvpython

Hii all, I am new to paraview pvpython interface, and I am having trouble reading xdmf file from pvpython interface. This documentation: 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\”, 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



Change this to

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

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.

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

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.