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

error in code....

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 4 messages available
Toggle history

Please log in to manage your subscriptions.

error in code.... Dov Kruger 04 Jun 11:39
  error in code.... Carol Spears 04 Jun 16:08
1086344359.32341.46.camel@p... 07 Oct 20:23
  error in code.... Carol Spears 04 Jun 16:39
Dov Kruger
2004-06-04 11:39:01 UTC (almost 20 years ago)

error in code....

Based on advice from this forum, the script now reads:

(define (dl-png2transindexed2 file)
(let*
(
(img (car
(file-png-load 1 file file)
)
)
(d (car (gimp-image-active-drawable img))) )
(gimp-layer-add-alpha (car (gimp-image-get-active-layer img))) (gimp-by-color-select d '(255 255 255) 0 2 0 0 0 0) (gimp-edit-clear)
(gimp-convert-indexed img 0 0 255 0 0 "") (file-png-save 1 img d file file 0 6 0 0 0 1 1) )
)

This yields the following error:

Error while executing (dl-png2transindexed2
"/home/dkruger/dev/matlab/sdv4/longislandsaltL10T24.png") ERROR: too few arguments (see errobj)

First of all, since it's probably obvious what I'm doing wrong, an answer is always appreciated, but I'd like to know if there is any mini-debugger available, or any way of seeing which line is the cause of the error. The error message says to "see errorobj" but I didn't see anything on the console, or a menu in the fu section that would show me the underlying cause.

thanks to all!

Carol Spears
2004-06-04 16:08:15 UTC (almost 20 years ago)

error in code....

On Fri, Jun 04, 2004 at 05:39:01AM -0400, Dov Kruger wrote:

Based on advice from this forum, the script now reads:

(define (dl-png2transindexed2 file)
(let*
(
(img (car
(file-png-load 1 file file)
)
)
(d (car (gimp-image-active-drawable img))) )
(gimp-layer-add-alpha (car (gimp-image-get-active-layer img))) (gimp-by-color-select d '(255 255 255) 0 2 0 0 0 0) (gimp-edit-clear)
(gimp-convert-indexed img 0 0 255 0 0 "") (file-png-save 1 img d file file 0 6 0 0 0 1 1) )
)

This yields the following error:

Error while executing (dl-png2transindexed2
"/home/dkruger/dev/matlab/sdv4/longislandsaltL10T24.png") ERROR: too few arguments (see errobj)

First of all, since it's probably obvious what I'm doing wrong, an answer is always appreciated, but I'd like to know if there is any mini-debugger available, or any way of seeing which line is the cause of the error. The error message says to "see errorobj" but I didn't see anything on the console, or a menu in the fu section that would show me the underlying cause.

okay, first of all, i do not do script-fu. so this is a non-technical answer from a non-script-fu user.

Sven hinted at the answer earlier in this thread, or someone did.

i am not sure why the run_mode stuff is in the argument lists for the different pdb calls, and this problem actually spills into gimp-python scripting and gimp-perl scripting but the argument for run_mode being non-interactive or interactive is not only unnecessary but certain to break any script.

the best documentation i found on the subject was on another dovs documentation. and looking over the updated stuff (http://imagic.weizmann.ac.il/~dov/gimp/scheme-tut.html) i cannot quickly find the warning.

anyways, forget the variable for interactive or non-interactive run_mode and probably you will only get errors that make sense.

carol

Carol Spears
2004-06-04 16:39:37 UTC (almost 20 years ago)

error in code....

On Fri, Jun 04, 2004 at 06:19:19AM -0400, Dov Kruger wrote:

Carol,

I'm not sure what you just said

Sven hinted at the answer earlier in this thread, or someone did.

i am not sure why the run_mode stuff is in the argument lists for the different pdb calls, and this problem actually spills into gimp-python scripting and gimp-perl scripting but the argument for run_mode being non-interactive or interactive is not only unnecessary but certain to break any script.

The only functions that I can find reference to interactive vs. non-interactive modes are png-save, and I believe that the value 1 is correct there. This script did work with the other technique, it's just the new calls that are different.

okay, did you try it without the argument there? we can theorize all day long via email. i tried to save you the months it took for me to find the answer (or possibly to understand it) and before we discuss this too much, could you at least try my suggestion?

the best documentation i found on the subject was on another dovs documentation. and looking over the updated stuff (http://imagic.weizmann.ac.il/~dov/gimp/scheme-tut.html) i cannot quickly find the warning.

While it is always cool to find another Dov out there, and I was looking at the code for examples of scheme, it doesn't have the answer to the immediate problem.

anyways, forget the variable for interactive or non-interactive run_mode and probably you will only get errors that make sense.

try:
(file-png-save img d file file 0 6 0 0 0 1 1) and dont ask me why.

carol