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)
the error message indicates that the second argument is missing. Please
try again using the following syntax:
LoadPlugin("yourlibname.so", ns=globals())
this is documented in the source code of
Utilities/VTKPythonWrapping/paraview/simple.py
def LoadPlugin(filename, ns=None):
"""Loads a ParaView plugin and updates this module with new constructors
if any. If you loaded the simple module with from paraview.simple
import *,
make sure to pass globals() as the second arguments:
LoadPlugin("myplugin", globals())
Otherwise, the new functions will not appear in the global namespace."""
Jean--
Swiss National Supercomputing Center
_______________________________________________
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