fablabnbg / inkscape-silhouette

An extension to drive Silhouette vinyl cutters (e.g. Cameo, Portrait, Curio series) from within inkscape.
GNU General Public License v2.0
495 stars 113 forks source link

ModuleNotFoundError: No module named 'gi' #279

Open brandonros opened 10 months ago

brandonros commented 10 months ago

Opening an issue for myself to work through to try and help get a clean run on this with Mac.

Traceback (most recent call last):
  File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex/gui/__init__.py", line 39, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkman/inkman/manage_extensions.py", line 29, in <module>
    from inkex import gui
  File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex/gui/__init__.py", line 50, in <module>
    raise DependencyError(
inkex.utils.DependencyError: You are missing the required libraries for Gtk. Please report this problem to the Inkscape developers.

Happens when going to Extensions -> Manage Extensions

Also worth nothing Extensions -> Render -> Silhouette is not there

t0b3 commented 10 months ago

Also worth nothing Extensions -> Render -> Silhouette is not there

is the INX file in the wrong folder maybe? you can double check what is the folder given in the inkscape > preferences > system > inkscape extensions and verify the installation of sendto_silhouette.inx went to the correct place... HTH

brandonros commented 10 months ago

Inkscape extensions: /Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions

INFO: installing extension
INFO: directory already exists '/Users/brandon/Library/Application Support/org.inkscape.Inkscape/config/inkscape/extensions/silhouette'. Removing it and recreating it.

It's getting installed to User extensions folder instead, do you think that's an error or ok @t0b3 ?

image

brandonros commented 10 months ago

https://inkscape.org/forums/questions/manage-extensions-not-working-version-11-no-module-named-gi/ it could be an Inkscape extension manager issue and not related to this extension per se

t0b3 commented 10 months ago

It's getting installed to User extensions folder instead, do you think that's an error or ok @t0b3 ?

both should work fine, although could be interesting for debugging purpose to try it the other way round to see if the observed error persists...

brandonros commented 10 months ago
Traceback (most recent call last):
  File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex/gui/__init__.py", line 39, in <module>
    import gi
  File "/opt/homebrew/lib/python3.11/site-packages/gi/__init__.py", line 40, in <module>
    from . import _gi
ImportError: dlopen(/opt/homebrew/lib/python3.11/site-packages/gi/_gi.cpython-311-darwin.so, 0x0002): Symbol not found: _g_assertion_message_cmpint
  Referenced from: <6AC8CE2B-EA29-3D35-8AB0-A68A81D35426> /opt/homebrew/Cellar/pygobject3/3.46.0_1/lib/python3.11/site-packages/gi/_gi.cpython-311-darwin.so
  Expected in:     <E28BE233-BA84-3CFA-B97E-0F5B2C5A502E> /Applications/Inkscape.app/Contents/Resources/lib/libglib-2.0.0.dylib

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkman/inkman/manage_extensions.py", line 29, in <module>
    from inkex import gui
  File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex/gui/__init__.py", line 50, in <module>
    raise DependencyError(
inkex.utils.DependencyError: You are missing the required libraries for Gtk. Please report this problem to the Inkscape developers.

weird extension manager errors

only thing I found online is this: https://github.com/pld-linux/gtk4/commit/bda3207bdb84ce875284521e8ab57a9baa18ae6e

t0b3 commented 10 months ago

did you report an inkscape issue upstream ?