diff --git a/bin/postprocessing/extractlinedata.py b/bin/postprocessing/extractlinedata.py
index a854982774ebc715123f32cfaf0085ce59546839..25ed6cc85ec7358dc3c4296cc6cbde6ff0a088f6 100644
--- a/bin/postprocessing/extractlinedata.py
+++ b/bin/postprocessing/extractlinedata.py
@@ -45,7 +45,10 @@ for curFile in args['files']:
     counter += 1
 
     # load vtk file
-    vtkFile = XMLUnstructuredGridReader(FileName=curFile)
+    if os.path.splitext(curFile)[1] == ".vtp":
+        vtkFile = XMLPolyDataReader(FileName=curFile)
+    else:
+        vtkFile = XMLUnstructuredGridReader(FileName=curFile)
     SetActiveSource(vtkFile)
 
     # apply and configure PlotOverLine filter