Gimp-Forum.net

Full Version: ofn-preset-guides
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
(04-29-2020, 04:11 AM)mahvin Wrote: [ -> ]
(04-28-2020, 10:47 PM)mahvin Wrote: [ -> ]IOError: [Errno 13] Permission denied: '/opt/local/lib/gimp/2.0/plug-ins/ofn-preset-guides.log'
gimp: LibGimpBase-WARNING: gimp: gimp_wire_read(): error
GIMP-Error: Unable to run plug-in "ofn-preset-guides.ini"
(/opt/local/lib/gimp/2.0/plug-ins/ofn-preset-guides.ini)

Failed to execute child process “/opt/local/lib/gimp/2.0/plug-ins/ofn-preset-guides.ini” (Exec format error)

gimp: LibGimpBase-WARNING: gimp: gimp_wire_read(): error

Weirdness abounds.


I solved the problem: (human error) I inadvertently moved both files into plugins folder, individually. Once I placed the folder in plugins, and moved both files into it, the script worked.

Should have worked both ways. The error message about the .ini is Gimp trying to run everything in sight since, unlike Linux/OSX, there is no "executable" bit in Windows.
Hi Ofnuts

I installed the latest ofn-preset-guides on Win 10 with GIMP 2.10. There seems to be a problem with text encoding:


Console Message
Quote:Querying plug-in: 'C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.py'
GIMP-Fehler: Plug-in "ofn-preset-guides.py"
(C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.py)

attempted to install procedure "python-fu-ofn-create-none-none-guides" with invalid UTF-8 strings.

GIMP-Fehler: Plug-in "ofn-preset-guides.py"
(C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.py)
attempted to register the menu item "<Image>/Image/Guides/Presets/" for the procedure "python-fu-ofn-create-none-none-guides".
It has however not installed that procedure.  This is not allowed.


Logfile
Quote:Reading configuration file C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.ini
Configuration file C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.ini not found or not readable: 'utf8' codec can't decode byte 0xfc in position 19: invalid start byte

The ini-file is in utf-8 format.

Can you direct me how to fix this error?


Thanks for your help!
Cheers, Miguel
(02-19-2021, 09:31 PM)miguel Wrote: [ -> ]Hi Ofnuts

I installed the latest ofn-preset-guides on Win 10 with GIMP 2.10. There seems to be a problem with text encoding:


Console Message
Quote:Querying plug-in: 'C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.py'
GIMP-Fehler: Plug-in "ofn-preset-guides.py"
(C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.py)

attempted to install procedure "python-fu-ofn-create-none-none-guides" with invalid UTF-8 strings.

GIMP-Fehler: Plug-in "ofn-preset-guides.py"
(C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.py)
attempted to register the menu item "<Image>/Image/Guides/Presets/" for the procedure "python-fu-ofn-create-none-none-guides".
It has however not installed that procedure.  This is not allowed.


Logfile
Quote:Reading configuration file C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.ini
Configuration file C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.ini not found or not readable: 'utf8' codec can't decode byte 0xfc in position 19: invalid start byte

The ini-file is in utf-8 format.

Can you direct me how to fix this error?


Thanks for your help!
Cheers, Miguel

Can you put your .ini file in a zip and attach the zip here? See here for instructions if needed.

You can also find online tools to check your UTF-8 encoding, such as this
Thanks for your reply.I use your unaltered files from SourceForge.

I discovered that the error must come from the unencoded os.path. My userpath includes a umlaut like 'ä', which brakes the script.
If I install the script in C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins and run GIMP as an admin (otherwise it fails to write ofn-preset-guides.log) all works fine.

Is it possible for you to modify the script that it can handle also userpaths with umlauts? (I tried some changes by myself but did not succeed)
(02-20-2021, 11:02 AM)miguel Wrote: [ -> ]Thanks for your reply.I use your unaltered files from SourceForge.

I discovered that the error must come from the unencoded os.path. My userpath includes a umlaut like 'ä', which brakes the script.
If I install the script in C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins and run GIMP as an admin (otherwise it fails to write ofn-preset-guides.log) all works fine.

Is it possible for you to modify the script that it can handle also userpaths with umlauts? (I tried some changes by myself but did not succeed)

If you replace line 80 with:

Code:
whoiam=''

does it work? But this would only explain the first error. The error Configuration file C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.ini not found or not readable: 'utf8' codec can't decode byte 0xfc in position 19: invalid start byte looks like an encoding problem in your .ini.
[quote pid='22154' dateline='1613821788']
If you replace line 80 with:

Code:
whoiam=''

does it work? But this would only explain the first error. The error Configuration file C:\Users\foo\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.ini not found or not readable: 'utf8' codec can't decode byte 0xfc in position 19: invalid start byte looks like an encoding problem in your .ini.
[/quote]

The ini now lioads without any error and the menu is available in GIMP :-).

CONSOLE
Querying plug-in: 'C:\Users\xxxx xüxxxxx\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.py'

Querying plug-in: 'C:\Users\xxxx xüxxxxx\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.ini'
GIMP-Fehler: Unable to run plug-in "ofn-preset-guides.ini"
(C:\Users\xxxx xüxxxxx\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.ini)
Kindprozess konnte nicht ausgeführt werden (Exec format error)


LOG
Reading configuration file C:\Users\xxxx xüxxxxx\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.ini

Preset "Centered": registering
Preset "Margins @20px": registering
Preset "Margins @50px": registering
Preset "Full Monty": registering
Preset "Crosshair": registering
Preset "Horizontal": registering
Preset "Vertical": registering
Preset "Frame": registering
Configuration file C:\Users\xxxx xüxxxxx\AppData\Roaming\GIMP\2.10\plug-ins\ofn-preset-guides.ini read successfully
OK, so I know where to fix, thanks for the test.
Thank you for this most useful plugin it is going to be a great time saver Smile Just getting the hang of using it starting with the supplied .ini file. For Frame, Horizontal and Vertical I noticed a couple of the guides are duplicated as 0. counts both ways. So I changed my .ini file to

Horizontal:horizontal:0.::L
Vertical:vertical::0.:L
Frame:frame:0.:0.:L
Well, it's actually a bug(*), that I shall fix rather quickly.

(*) quite a beginner's bug actually, to boot.
Updated on sourceforge. Also added the possibility to enter guide positions as percent values.
Pages: 1 2 3 4