[Paraview] Problems loading plugins in pvpython

David E DeMarle dave.demarle at kitware.com
Thu Dec 3 10:18:31 EST 2009


I've seen this happen when:
* i was working under windows
* i was using an external python shell (idle)

The exact same script ran find under pvpython AND the python shell
within the client. The same script (with path changed appropriately)
on my mac build works fine.

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



On Thu, Dec 3, 2009 at 10:12 AM, Adriano Gagliardi <agagliardi at ara.co.uk> wrote:
> 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
>


More information about the ParaView mailing list