Bundled PyGObject configuration issue(s) (Mac)
Following #455 (closed) and testing in Inkscape 1.0 (4035a4fb, 2020-05-01) on macOS 10.14, there are persisting errors in PyGObject.
Part 1: Warning on import
Following along with the same examples in the prior issue, I copied just the import part of the basic dialog box sample code from here -- Example 17.1.1 from the Python GTK+ 3 Tutorial.
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
I pasted that snippet into a known-working extension, hershey.py, pasting the entirety of the example right above class Hershey( inkex.Effect ): in the file.
Result:
This causes a warning to display:
(hershey.py:2498): Gtk-WARNING **: 10:04:26.841: Locale not supported by C library.
Using the fallback 'C' locale.
This warning was also present in the previous issue report.
While not fatal, a warning like this:
- Does appears that it reflects a configuration issue with the library, rather than an error on the part of the extension.
- Does -- in practice -- preclude the use of this library by Inkscape extensions.
Part 2: Additional warnings on file-chooser dialog box.
I then copied the file-chooser dialog box example code from here -- Example 17.3.1 from the Python GTK+ 3 Tutorial.
As before, I pasted the code into a known-working extension, hershey.py, pasting the entirety of the example right above class Hershey( inkex.Effect ): in the file.
This opens a dialog box as before, with additional buttons to open the file-chooser dialog.
Clicking to open the file chooser gives this error:
hershey.py:2511): Gtk-WARNING **: 10:10:59.454: Locale not supported by C library.
Using the fallback 'C' locale.
(hershey.py:2511): Gtk-WARNING **: 10:11:04.425: dlopen(@executable_path/../Resources/lib/gtk-3.0/3.0.0/immodules/im-quartz.so, 1): image not found
(hershey.py:2511): Gtk-WARNING **: 10:11:04.425: Loading IM context type 'quartz' failed
(hershey.py:2511): Gtk-WARNING **: 10:11:04.441: dlopen(@executable_path/../Resources/lib/gtk-3.0/3.0.0/immodules/im-quartz.so, 1): image not found
(hershey.py:2511): Gtk-WARNING **: 10:11:04.441: Loading IM context type 'quartz' failed
(hershey.py:2511): Gtk-WARNING **: 10:11:04.442: dlopen(@executable_path/../Resources/lib/gtk-3.0/3.0.0/immodules/im-quartz.so, 1): image not found
(hershey.py:2511): Gtk-WARNING **: 10:11:04.442: Loading IM context type 'quartz' failed
(hershey.py:2511): Gtk-WARNING **: 10:11:04.442: dlopen(@executable_path/../Resources/lib/gtk-3.0/3.0.0/immodules/im-quartz.so, 1): image not found
(hershey.py:2511): Gtk-WARNING **: 10:11:04.442: Loading IM context type 'quartz' failed
hershey.py:76: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
button1 = Gtk.Button("Choose File")
[Additional PyGTKDeprecationWarnings redacted]
Presumably the PyGTKDeprecationWarning set at the end is correct and reflects out-of-date code in the example. However, the other errors appear more worrisome.