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

Errors in python importing modules

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.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Errors in python importing modules Paco Garcia via gimp-developer-list 18 Sep 06:28
  Errors in python importing modules Ofnuts 18 Sep 16:23
Paco Garcia via gimp-developer-list
2018-09-18 06:28:33 UTC (over 5 years ago)

Errors in python importing modules

All the scripts in python that worked in previous versions of gimp have stopped doing so in the new ones, the problem seems to be that there is some change when importing external classes, there has been some change in the code that makes the call to external modules be different? In what way do you have to use "import" to make it work? There is some way to debug the scripts using "--verbose" that returns more information about the error than the one provided by the generic message "gimp-wire-read (): error" Thanks in advance for any help to solve the problems. Script that fails:
http://www.arakne.es/en/programming/python/gimp-plugin-shape-creator-v8/ Spanish version of this message:
Todos los scripts en python que funcionaban en anteriores versiones de gimp han dejado de hacerlo en las nuevas, el problema parece ser que hay algún cambio al importar classes externas, ¿se ha realizado algún cambio en el código que haga que la llamada a módulos externos sea distinta? de que manera hay que usar "import" para que funcione? ¿Hay alguna forma de depurar los scripts usando "--verbose" que devuelva mas información sobre el error que la que proporciona el mensaje genérico "gimp-wire-read(): error"?
Gracias de antemano por cualquier ayuda para solucionar los problemas. Script que falla:
http://www.arakne.es/en/programming/python/gimp-plugin-shape-creator-v8/

Ofnuts
2018-09-18 16:23:16 UTC (over 5 years ago)

Errors in python importing modules

On 09/18/18 08:28, Paco Garcia via gimp-developer-list wrote:

All the scripts in python that worked in previous versions of gimp have stopped doing so in the new ones, the problem seems to be that there is some change when importing external classes, there has been some change in
the code that makes the call to external modules be different? In what way
do you have to use "import" to make it work? There is some way to debug the
scripts using "--verbose" that returns more information about the error than the one provided by the generic message "gimp-wire-read (): error" Thanks in advance for any help to solve the problems. Script that fails:
http://www.arakne.es/en/programming/python/gimp-plugin-shape-creator-v8/

Plenty of Python script still work... There is a problem in Windows with Python plugins that have their own UI written with pygtk, where you now need to import gimp stuff before pyGTK. In the mentioned script, I see "import gtk, gimpui,..." and maybe these should be reversed.

See https://gitlab.gnome.org/GNOME/gimp/issues/1510