[Paraview] Problems loading plugins in pvpython
Adriano Gagliardi
agagliardi at ara.co.uk
Thu Dec 3 10:12:23 EST 2009
I'm trying to use the LoadPlugin simple module in pvpython, but I keep
getting this error:
>>> LoadPlugin("myLib.so", True)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/usr/people/gagliard/Paraview/ParaView3.6.2-rc1/Utilities/VTKPythonWrapping
/paraview/simple.py", line 548, in LoadPlugin
servermanager.LoadPlugin(filename, remote)
File
"/usr/people/gagliard/Paraview/ParaView3.6.2-rc1/Utilities/VTKPythonWrapping
/paraview/servermanager.py", line 2115, in LoadPlugin
LoadXML(f.read())
File
"/usr/people/gagliard/Paraview/ParaView3.6.2-rc1/Utilities/VTKPythonWrapping
/paraview/servermanager.py", line 2084, in LoadXML
if not parser.Parse(xmlstring):
TypeError: function takes exactly 2 arguments (1 given)
The help for LoadPlugin states:
Help on function LoadPlugin in module paraview.simple:
LoadPlugin(filename, remote=True, ns=None)
Loads a ParaView plugin and updates this module with new constructors
if any. The remote argument (default to True) is to specify whether
the plugin will be loaded on client (remote=False) or on server
(remote=True).
If you loaded the simple module with from paraview.simple import *,
make sure to pass globals() as an argument:
LoadPlugin("myplugin", False, globals()), to load on client;
LoadPlugin("myplugin", True, globals()), to load on server;
LoadPlugin("myplugin", ns=globals()), to load on server.
Otherwise, the new functions will not appear in the global namespace.
So, I really should be able to pass it a single argument if I want to, but
whether I give it 1, 2 or 3 arguments it will still give me the same
TypeError. However, it works fine in the interactive Python shell.
Is this a bug or have I forgotten to do something?
Cheers,
Adriano
===================================
Adriano Gagliardi MEng PhD
Project Scientist
Computational Aerodynamics
Aircraft Research Association Ltd.
Manton Lane
Bedford
Tel: 01234 32 4644
E-mail: agagliardi at ara.co.uk
Url: www.ara.co.uk
---------------------------
This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.
Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons.
Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245
More information about the ParaView
mailing list