[Paraview] Problems loading plugins in pvpython

Adriano Gagliardi agagliardi at ara.co.uk
Thu Dec 3 10:20:22 EST 2009


Ok, this is an obvious error on my part. The problem was because I was
trying to load a GUI plugin after loading the servermanager plugin, which is
pointless in batch mode. I guess it is getting too close to Christmas!


===================================

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 
-----Original Message-----
From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org]
On Behalf Of Adriano Gagliardi
Sent: 03 December 2009 15:12
To: 'ParaView'
Subject: [Paraview] Problems loading plugins in pvpython

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


_______________________________________________
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


---------------------------
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