>>>>> On Mon, 31 Aug 2009 12:42:43 +0200 >>>>> "JMF" == Jean M Favre <jfa...@cscs.ch> wrote:
JMF> Bernhard Gschaider wrote: >> Hi! >> >> I'm trying to update a pvpython-script from 3.4 to 3.6.1 >> >> Amongst other things it should load a Plugin. The plugin loads >> perfectly over the GUI, but when I try to do it from the script >> it fails with this message: >> >> File >> "/home/bgschaid/Development/OpenFOAM/Python/PyFoam/PyFoam/Paraview/ServermanagerWrapper.py", >> line 41, in __init__ >> servermanager.LoadPlugin(path.join(p,plug1)) File >> "/home/openfoam/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/Utilities/VTKPythonWrapping/paraview/servermanager.py", >> line 2094, in LoadPlugin if not parser.Parse(f.read()): >> TypeError: function takes exactly 2 arguments (1 given) JMF> the error message indicates that the second argument is JMF> missing. Yeah. But not to LoadPlugin, but to the Parse-method of parser (which is a vtkSMXMLParser-object). And that is a method that I'm not calling myself. JMF> Please try again using the following syntax: JMF> LoadPlugin("yourlibname.so", ns=globals()) Gives the same error. JMF> this is documented in the source code of JMF> Utilities/VTKPythonWrapping/paraview/simple.py JMF> def LoadPlugin(filename, ns=None): """Loads a ParaView plugin JMF> and updates this module with new constructors if any. If you JMF> loaded the simple module with from paraview.simple import *, JMF> make sure to pass globals() as the second arguments: JMF> LoadPlugin("myplugin", globals()) Otherwise, the new JMF> functions will not appear in the global namespace.""" Good hint anyway, I'd probably have searched for the missing reader once the above problem is solved ;) Bernhard JMF> Jean-- Swiss National Supercomputing Center JMF> _______________________________________________ Powered by JMF> www.kitware.com JMF> Visit other Kitware open-source projects at JMF> http://www.kitware.com/opensource/opensource.html JMF> Please keep messages on-topic and check the ParaView Wiki at: JMF> http://paraview.org/Wiki/ParaView JMF> Follow this link to subscribe/unsubscribe: JMF> http://www.paraview.org/mailman/listinfo/paraview -- --------------------------------------------------------------------------- DI Bernhard F.W. Gschaider --------------------------------------------------------------------------- EMail: bernhard.gschai...@ice-sf.at WWW : www.ice-sf.at Jabber : bgsch...@jabber.org Tel: +43(3842)98282-42 Fax: +43(3842)98282-02 ---------------------------------------------------------------------------
pgpoDk1KCr9az.pgp
Description: PGP signature
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview