Errors in python importing modules

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Errors in python importing modules

Developers mailing list
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/
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Errors in python importing modules

Ofnuts-2
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
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list