It is currently 19 Jan 2020, 05:53


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Revive a broken(?) script

Share your Python Fu Scripts/plug-ins for GIMP here
No avatar
Morphéus2
Forum Member

Revive a broken(?) script

Post#1 by Morphéus2 » 18 Oct 2019, 18:40


Hello everyone,

A long time ago I posted on this forum to find help to create a script that can automatise some task that I use for work. One of you generously proposed to write it for me and for free (thanks again @Tin Tran)! It worked very well and save me literally hundreds hours of work. Recently it started to provoke crashes when running. I receive the error message "fatal error: unhandled exception".
I try the few thing I think could help. I make a clean reinstall of gimp 2.8, stay here. Try to pass to 2.10.12 put the plug-in, same problem. The crash doesn't happen systematically, it happen every 1 to 10 times I run the script. I'm starting to be desperate and I don't know how to trouble shooting the thing anymore.
Can maybe someone give me idea how to search for problem identification if not for solution. I will attach the script to the message if someone want to take a look and see if he can identify any anomaly.

Thanks you in advance and please forgive me for my poor English,
Morphéus
Attachments
morpheus_automate.py
(4.97 KiB) Downloaded 36 times
map-scale-legend.py
(6.32 KiB) Downloaded 42 times
0

tim
GL Blogger

Post#2 by tim » 18 Oct 2019, 20:29


Sorry I tried running the script with 1 tif file and it works repeatedly.
To solve a problem, you'd have to identify what causes it and I am unable to make it error so I can't fix which doesn't seem to cause a problem.
If it happens 1 to 10 times then it's really hard to find out what's wrong without the ability to reproduce the problem.
the next best thing is to put a try catch around the loop so that if it fails running on one image it just reports failure on that tif and continue on with the rest of thet tif files. That way even if it fails you still have most of your result and examine the tif that failed and maybe rerun the process on that failed tif alone.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
1

No avatar
Morphéus2
Forum Member

Post#3 by Morphéus2 » 18 Oct 2019, 21:15


Thanks for the answer and good idea with the catch around loop.
But sadly Right know it crash each and every time on my side I cannot run it anymore. When launching it, the script manage to realise the first resize tif pict. but crash when producing the jpeg.
I don't understand how it works on your side because I clean Install GIMP and both script on another computer, same crash and systematic ones.
EDIT: so no it's not systemmatic, just really often.
0

tim
GL Blogger

Post#4 by tim » 20 Oct 2019, 01:56


I would need to your sample tif to try to reproduce it. When I tested i just exported a blank image as .tif.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

No avatar
Morphéus2
Forum Member

Post#5 by Morphéus2 » 20 Oct 2019, 11:55


Here is https://www.filehosting.org/file/detail ... RWN_4a.tif.
If it only export a .tif and no .jpg it's mean it didn't work all the way, the output should be a .tif redimensioned and one .jpg with a scale indicator. When the script crash, it always manages to produce the .tif, it crash during the .jpeg creation or exportation. I also select a part of the initial image with the rectangle tool (I don't know how it could affect it, but why not at this point).

EDIT: additional observations:
When I encounter the bug, if I relauch GIMP, he ask me if I want to retrive my work, If I do, I will find the picture crop, with the scale indicator draw, so the bug should occur at the export of the .jpeg.
1

tim
GL Blogger

Post#6 by tim » 21 Oct 2019, 03:59


tried to download the tif. but it said to enter my email which i did and accepted terms and requested download link but no mail came through (checked my spam as well nothing).
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

No avatar
rich2005
GIMP Guru

Post#7 by rich2005 » 21 Oct 2019, 09:42


Might be better with another example. That one works here (I think) linux Gimp 2.10.12 Some stats:

The image is 16 bit greyscale with Epson icc. - I kept that icc when opening the image.

Running the script: The backup tif is largely the same as the original unmodified. 16 bit greyscale with Epson icc. File size is slightly larger (maybe some extra metadata)
The jpeg with the 'watermark' is created. Nothing special greyscale 8 bit as you might expect.

A screenshot of the three images: https://i.imgur.com/N2xFVxj.jpg
0

No avatar
Morphéus2
Forum Member

Post#8 by Morphéus2 » 22 Oct 2019, 11:12


Thanks you both of you for your help.I cannot understand why it work for both of you but crash so regularly on my side and on both of my computers? Maybe some hardware limitation (like a need of a ton of RAM or some shenanigan like that, could explain the randomisation of crash). I will try on a third computer and see what occur.
0

No avatar
Morphéus2
Forum Member

Post#9 by Morphéus2 » 01 Nov 2019, 13:13


Try on a third computer, no luck either. The random crash continue. Any of you know if it's possible to implemant at least a "loop around" so when it happen, I don't have to restart Gimp and everything?
0

tim
GL Blogger

Post#10 by tim » 02 Nov 2019, 15:59


If Gimp 2.10 is constantly doing to you. I suggest you install GIMP 2.8 to just use this process.. I mean if it's working there's no need to use Gimp 2.10 unless you want the new features.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
1


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply
  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

Who is online

Users browsing this forum: No registered users and 4 guests