It is currently Thu Aug 13, 2026 11:36 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Managing scripts "*.scm" (solved for the case, open for parser)
PostPosted: Thu Mar 07, 2013 2:34 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
Hi everybody!
I don't know whether between the many gurus around here, there is somebody who has to deal with the module (I guess it's "script-fu.exe") which analyses and load the various scripts ".scm", I hope yes.
I'd like to point out what happens (at least to me...) when one of the added scripts has something unacceptable: if I refresh the scripts ALL THE SCRIPTS ARE LISTED ARE BEING IN ERROR!!! (typical message for each script: unbound variable: -blanks-) which is obviously not true.
If I just added one script, it's simple to remove the new one, then try to understand where the error is (if I can...), but if I added a set of them, I need to remove them all, then add one at a time until errors come out.
This is time consuming...
Is there a good reason for such a behaviour? Why is it not possible to get ONLY the script (or scripts) in error in the list?
Many thanks...

_________________
"Where am I ?"


Last edited by dinasset on Thu Mar 07, 2013 3:34 pm, edited 1 time in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Managing scripts "*.scm"
PostPosted: Thu Mar 07, 2013 2:53 pm  (#2) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
Do you have an example of a script that causes this behaviour?

I've never seen that happen - a script with an error is always reported as an individual script for me.

The error message unbound variable: -blanks- suggests that you have script files with non-ASCII characters in them - are you opening and re-saving them using anything?

Kevin


Top
 Post subject: Re: Managing scripts "*.scm"
PostPosted: Thu Mar 07, 2013 3:03 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
Hi Kevin.
I downloaded a set of scripts from Saul Goode.
One of them seems to be - for a reason I do not understand - unacceptable:
sg-layer-extend
I attach the downloaded script (I only changed the menu)


Attachments:
sg-layer-extend.scm [4.82 KiB]
Downloaded 126 times

_________________
"Where am I ?"
Top
 Post subject: Re: Managing scripts "*.scm"
PostPosted: Thu Mar 07, 2013 3:08 pm  (#4) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
What did you edit it with? as it has a lot of binary data (i.e. non ASCII) at the end of the file, that also includes the word Arial.

So my suspicion is that you've edited it with a word processor (Word, Wordpad, Open Office etc) rather than a text editor (Notepad, TextPad, Emacs, vi etc)

Kevin


Top
 Post subject: Re: Managing scripts "*.scm"
PostPosted: Thu Mar 07, 2013 3:10 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Nov 16, 2011
Posts: 5127
Location: Metro Vancouver, BC
dinasset wrote:
This is time consuming...
Is there a good reason for such a behaviour? Why is it not possible to get ONLY the script (or scripts) in error in the list?
Many thanks...
Can you post your Error Console log output.
Windows → Dockable Dialogs → Error Console

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Managing scripts "*.scm"
PostPosted: Thu Mar 07, 2013 3:13 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
OK, you are right, I didn't see. I'll try to clean and retry.
But my basic question remains: while with this wrong file all others become in error?

_________________
"Where am I ?"


Top
 Post subject: Re: Managing scripts "*.scm"
PostPosted: Thu Mar 07, 2013 3:15 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
to Odinbc:
I will reintroduce the script in error to get the list, just a minute

_________________
"Where am I ?"


Top
 Post subject: Re: Managing scripts "*.scm"
PostPosted: Thu Mar 07, 2013 3:19 pm  (#8) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
dinasset wrote:
OK, you are right, I didn't see. I'll try to clean and retry.
But my basic question remains: while with this wrong file all others become in error?


Probably because all scripts are loaded into a common name-space (why I created the duplicate script checker) and the non-ascii data is confusing the file parser into doing odd things.


Top
 Post subject: Re: Managing scripts "*.scm"
PostPosted: Thu Mar 07, 2013 3:28 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
OK paynekj, I understand, even if (from a viewpoint of a programmer of a parser) I would reset all error status when a new file is loaded and examined.
Maybe the parser can be enhanced in that sense.

_________________
"Where am I ?"


Top
 Post subject: Re: Managing scripts "*.scm"
PostPosted: Thu Mar 07, 2013 3:31 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
Final answer to Kevin.
Removed the wrong appendix and no more problems.
Thanks a lot for your support:
(Still hope the parser would have to be improved.....)

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group