Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FxCopyrightEgger malfunction
#1
On my Gimp 2.8 with Windows 10,when I try to apply Fx Foundry copyright on my images (i used this function successfully with older Gimp) I get 2 error messages : 1) plug in 'Eg coyright placer' image left undo in inconsistent state,closing open undo  groups, and b) :
Error when executing script-Fu-egg-copyright .Errror (:1) eval: unbound variable:cadr
Someone please enlighten !
Reply
#2
Works for me. First message is expected if there is another error. Have you got the file egger-copyright.scm somewhere, and if so what is its size in bytes and are there any dats in the copyyright at the top (you can open it with a text editor)? The initial source is quite old (2007...) and has been upgraded for recent Gimp versions.
Reply
#3
OfnutsWorks for me. First message is expected if there is another error. Have you got the file egger-copyright.scm somewhere, and if so what is its size in bytes and are there any dats in the copyyright at the top (you can open it with a text editor)? The initial source is quite old (2007...) and has been upgraded for recent Gimp versions.

Hi Ofnuts,

Yes : 6,533 Bytes
;
; The GIMP -- an image manipulation program
; Copyright © 1995 Spencer Kimball and Peter Mattis
;
; Copyright script(v1.0a) for GIMP 2.4
; Original author: Martin Egger (martin.egger@gmx.net)
; © 2005, Bern, Switzerland
;
; Tags: copyright, signature
;
; Author statement:
;
; You can find more about simulating BW at
; http://epaperpress.com/psphoto/
;
; --------------------------------------------------------------------
; Distributed by Gimp FX Foundry project
; --------------------------------------------------------------------
;   - Changelog -
;AlSO READS : RELEASE INFO 23.03.2008

116 script files for GIMP 2.4.

License info:
  Scripts contained in this pack are licensed under GPL license,
  either version 2 or version 3 or in some cases public domain
  according to the authors preference.
  The used license is outlined in each scripts header.

How to use this release:
   Extract the downloaded pack and copy the files to
   your scripts folder.
   * Default scripts folder under your profile is a bit
   uncomfortable to use, as the path ends to be hidden by 
   the system. The easiest way to manage your own scripts 
   is to add a more comfortable scripts path from Preferences->Paths.

This release has online documentation and single script download available
at http://gimpfx-foundry.sourceforge.net/browse/. List of individual
script authors can be found at  http://gimpfx-foundry.sourceforge.net/br..._name.html

CAUTIONS!
   If you practice renaming script files and are doing an
   update make sure no older versions of files are left in
   scripts paths, as it is undetermined which of the
   function versions will ultimately be called.
   
   If you have a lot of scripts already and adding these
   breaks everything, remove some scripts and try again.
   Script-fu has a limit to how many script elements it
   can handle and will not work if that border is crossed.
 
Fixing and maintenance:
  The GIMP FX Foundry devlopers.
  Join us at http://gimpfx-foundry.sourceforge.net/
  Please file bugreports and feature requests to our tracker 
  and ask for help or propose scripts for inclusion in our forums.

And I have another one :1.06 MB (1,118,208 bytes) :
with all sorts of scripts including Egger copyright SCM file of 7kb please see attachment
Thanks !    
Reply
#4
The header you have doesn't match any version from http://gimpfx-foundry.sourceforge.net/ I suggest going there and getting their latest (which is itself quite old, but at least shoul dwork with 2.6-2.8). I notice that the version I have has fixes you don't see in the SF repo.
Reply
#5
I just went there 1/2 hr ago and dowloaded again  GIMP 2.6
and it came loaded with the Script Fx forge and I selected from drop down and when i used it on an image it gave me the same 2 errors i mentioned above......

Reply
#6
Same script - ; Copyright script(v1.0a) for GIMP 2.4 size 6533 B

Tried in a Win7 (VM) with Gimp 2.8.22 and Gimp 2.10RC1 (partha)

In each case the script works and as well as default values, works with various values and different fonts, (incl wingdings as a test).

Going to be something peculiar to your installation. You could give more details, language settings, the font you use...etc but looks like difficult to diagnose at a distance.

Edit: the only instance of cadr in the script, is line 56 (text-height (cadr text-size)), so probably something before that relating to text.

Still can not generate an error even with some strange fonts, but it would be a starting point.

edit again: Can you try this one: http://www.gimphelp.org/photo_copyright_text.html
It is the same script but updated for Gimp 2.8 FU_photo_copyright.scm size 7,178 B
Reply
#7
In Filters>Script-fu>Console, enter this:

Code:
(gimp-text-get-extents-fontname "Test" 40 PIXELS "Sans")

What is the answer? I get (79 46 37 -9)

And can you paste here from your current version of egger-copyright.scm:

  1. Any line that use cadr (in my version there is only one: (text-height (cadr text-size))
  2. The line with gimp-text-get-extents-fontname
Reply
#8
cadr is a function defined in script-fu.init :
Code:
;    Initialization file for TinySCHEME 1.40

; Per R5RS, up to four deep compositions should be defined
(define (caar x) (car (car x)))
(define (cadr x) (car (cdr x)))
(define (cdar x) (cdr (car x)))
...
Where script-fu.init is in C:\Program Files\GIMP-2\share\gimp\2.0\scripts

So if it's saying cadr is undefined, then I'd suspect the GIMP installation.

Try this in the Scrip-fu console:
Code:
(cadr '(1 2))
It should give the answer 2.
Reply
#9
(04-05-2018, 12:16 PM)Kevin Wrote: cadr is a function defined in script-fu.init :
Code:
;    Initialization file for TinySCHEME 1.40

; Per R5RS, up to four deep compositions should be defined
(define (caar x) (car (car x)))
(define (cadr x) (car (cdr x)))
(define (cdar x) (cdr (car x)))
...
Where script-fu.init is in C:\Program Files\GIMP-2\share\gimp\2.0\scripts

So if it's saying cadr is undefined, then I'd suspect the GIMP installation.

Try this in the Scrip-fu console:
Code:
(cadr '(1 2))
It should give the answer 2.

Hmmm. Could it be undefined by some other script? IIRC the script-fu script all run in the same environment and can conflict with each other?
Reply
#10
(04-05-2018, 01:31 PM)Ofnuts Wrote: Hmmm. Could it be undefined by some other script? IIRC the script-fu script all run in the same environment and can conflict with each other?

It seems that you can't 'undefine' something in Scheme, so once it's defined you can't ever get the unbound variable message within the same scope. As cadr should be defined at the top level, you shouldn't be able to get that error message.

And yes, all the scheme scripts exist in the same environment and can cause conflicts and much confusion, hence I wrote the duplicate-script-checker script all those years ago. (2011 Exclamation http://gimpchat.com/viewtopic.php?f=9&t=3057)
Reply


Forum Jump: