Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ofn-preset-guides
#11
(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.
Reply
#12
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
Reply
#13
(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
Reply
#14
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)
Reply
#15
(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.
Reply
#16
[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
Reply
#17
OK, so I know where to fix, thanks for the test.
Reply
#18
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
Reply
#19
Well, it's actually a bug(*), that I shall fix rather quickly.

(*) quite a beginner's bug actually, to boot.
Reply
#20
Updated on sourceforge. Also added the possibility to enter guide positions as percent values.
Reply


Forum Jump: