RSS/Atom feed Twitter
Site is read-only, email is disabled

dir(gimpfu.pdb) crashes

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

dir(gimpfu.pdb) crashes Jayesh Salvi 03 Dec 07:19
  dir(gimpfu.pdb) crashes David Gowers 03 Dec 09:59
  dir(gimpfu.pdb) crashes Joao S. O. Bueno 04 Dec 02:31
Jayesh Salvi
2007-12-03 07:19:21 UTC (almost 17 years ago)

dir(gimpfu.pdb) crashes

Hi,

I am trying to see what all methods gimpfu.pdb offers, by running dir() operation on it. But it crashes as follows:

[jayesh@localhost plug-ins]$ PYTHONPATH=$PYTHONPATH:/usr/lib64/gimp/2.0/python python Python 2.5 (r25:51908, Apr 10 2007, 10:27:40) [GCC 4.1.2 20070403 (Red Hat 4.1.2-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import gimpfu
dir(gimpfu.pdb)

LibGimpBase-ERROR **: gimp_wire_write_msg: the wire protocol has not been initialized
aborting...
Aborted

[jayesh@localhost plug-ins]$ rpm -qf /usr/lib64/gimp/2.0/python gimp-2.4.2-1.fc7

Does anyone know if this is known error? Is someone fixing it? I won't be using dir() operation in final code, but can this abort happen in other situations as well?

Thanks,
Jayesh

David Gowers
2007-12-03 09:59:20 UTC (almost 17 years ago)

dir(gimpfu.pdb) crashes

Hi Jayesh,

On Dec 3, 2007 4:49 PM, Jayesh Salvi wrote:

Hi,

I am trying to see what all methods gimpfu.pdb offers, by running dir() operation on it. But it crashes as follows:

[jayesh@localhost plug-ins]$ PYTHONPATH=$PYTHONPATH:/usr/lib64/gimp/2.0/python python Python 2.5 (r25:51908, Apr 10 2007, 10:27:40) [GCC 4.1.2 20070403 (Red Hat 4.1.2-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import gimpfu
dir(gimpfu.pdb)

LibGimpBase-ERROR **: gimp_wire_write_msg: the wire protocol has not been initialized
aborting...
Aborted

[jayesh@localhost plug-ins]$ rpm -qf /usr/lib64/gimp/2.0/python gimp-2.4.2-1.fc7

Does anyone know if this is known error?

Well, I know that it doesn't happen for me. dir(pdb) works fine for me. However, I don't make the mistake of thinking that I can import gimpfu from an instance of Python that is not running under GIMP. Try typing the same thing from the Python console in GIMP, and see the difference.

Anyway -- You cannot get a list of operations in the pdb by running dir() on it --
you only get the methods that allow you to do things with the pdb.

dir(pdb) ==

['__class__', '__delattr__', '__doc__', '__getattribute__', '__getitem__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'query']

As you can see, 'query' is the only method of the pdb object. pdb.query('') will get you a list of all pdb entries that you can call.
you can filter for specific names like this: pdb.query('image') will get you a list including only the entries with 'image' in their name.

Joao S. O. Bueno
2007-12-04 02:31:16 UTC (almost 17 years ago)

dir(gimpfu.pdb) crashes

On Monday 03 December 2007 06:19:21 am Jayesh Salvi wrote:

Hi,

I am trying to see what all methods gimpfu.pdb offers, by running dir() operation on it. But it crashes as follows:

[jayesh@localhost plug-ins]$ PYTHONPATH=$PYTHONPATH:/usr/lib64/gimp/2.0/python python Python 2.5 (r25:51908, Apr 10 2007, 10:27:40) [GCC 4.1.2 20070403 (Red Hat 4.1.2-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import gimpfu
dir(gimpfu.pdb)

LibGimpBase-ERROR **: gimp_wire_write_msg: the wire protocol has not been initialized
aborting...
Aborted

[jayesh@localhost plug-ins]$ rpm -qf /usr/lib64/gimp/2.0/python gimp-2.4.2-1.fc7

Does anyone know if this is known error? Is someone fixing it? I won't be using dir() operation in final code, but can this abort happen in other situations as well?

Gimpfu module can only be imported from a python console which is run under GIMP itself. Try that from the python console within GIMP.

js ->

Thanks,
Jayesh