implementing CanReadFile in a VTKPythonAlgorithmBase


I using VTKPythonAlgorithmBase to prototype a reader. I implemented the CanReadFile function in python but I’m unable make ParaView use it. I have 2 reader using the same extension, but only one return 1 in the function CanReadFile. But paraview keep showing me the dialogbox “Open Data With…” choose a reader. (the function are not called, I put prints statements to track the functions calls)

It is possible to implement the CanReadFile in python?

More info about this function in :

Thanks Felipe,

ps: using Paraview 5.8.1 on linux

That is indeed correct. Mind reporting a bug please? I think this patch address the issue (at least with master). I suspect it should work for 5.8.1. too.

fix.patch (1.1 KB)

Here’s an MR for the same:


I’m going to try to use this patch with my current paraview install.

Thanks again,

I see the MR, do I still need to report an issue ??

not necessary. I’ll just add a reference to this post in the MR so we can track the change.