inkex.py not found for extensions in ~/.inkscape

Bug #197475 reported by Thomas Holder on 2008-03-01
4
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Alexandre Prokoudine

Bug Description

python extensions which import inkex will fail to run if they are placed at ~/.inkscape/extensions. This can be fixed by appending "/usr/share/inkscape/extensions" to the PYTHONPATH environment variable. I guess Inkscape needs something like setenv("PYTHONPATH", INKSCAPE_EXTENSIONDIR, 1) during startup :-)

sas (sas-sas) wrote :

It shouldn't be hard to fix this. PYTHONPATH is semicolon-separated on Windows, is it colon-separated on Linix?

Changed in inkscape:
status: New → Confirmed
Thomas Holder (speleo3) wrote :

Thanks, committed to trunk :-)

Changed in inkscape:
assignee: nobody → alexandre-prokoudine
importance: Undecided → Medium
milestone: none → 0.47
status: Confirmed → Fix Released
Johan Engelen (johanengelen) wrote :

This does not compile on windows, so I commented the setenv line out for win32 builds :(
Please find an alternative method that does exist for mingw. I could not find one.

Changed in inkscape:
status: Fix Released → Confirmed
Thomas Holder (speleo3) wrote :

Johan, does it work on windows like this?

    const char *oldenv = g_getenv("PYTHONPATH");

    g_setenv("PYTHONPATH", tmp.c_str(), TRUE);

there was a mail and a patch on the dev list today which pointed this out.

Date: Mon, 27 Oct 2008 17:52:20 +0000
From: "Richard W.M. Jones"
Subject: [Inkscape-devel] [PATCH] Fedora MinGW cross-compiling patch, version 2
...
(4) Use g_getenv / g_setenv instead of getenv / setenv.

Thomas Holder (speleo3) wrote :

committed to trunk with g_setenv

prkos (prkos) wrote :

Was this fixed? I have a build from November 2nd and the bug is there

Thomas Holder (speleo3) wrote :

works for me on linux (build Nov 7th) and on windows (snapshot Nov 20th) so I'm quite sure this is fixed properly.

@prkos: what system and what exact bug behaviour / error message?

prkos (prkos) wrote :

I'm on linux (fedora 9)

I compiled a new build today and I still can't see one effect entry under the menu. I can see it in 0.46.
I also added the extension files under /usr/share/inkscape/extensions/ and in 0.46 I see doubled subentries. Still nothing in todays build.

The extension doesn't work (in 0.46), I get an error message about the extension files, could the problem be there?

This is what I get when running from terminal:

** (inkscape:30154): WARNING **: Extension definition started with <inkscape-extension> instead of <extension:inkscape-extension>. Extension will not be created. See http://wiki.inkscape.org/wiki/index.php/Extensions for reference.

** (inkscape:30154): WARNING **: Unable to create extension from definition file /home/prkos/.inkscape/extensions/gdadin_defshape.inx.

** (inkscape:30154): WARNING **: Extension definition started with <inkscape-extension> instead of <extension:inkscape-extension>. Extension will not be created. See http://wiki.inkscape.org/wiki/index.php/Extensions for reference.

** (inkscape:30154): WARNING **: Unable to create extension from definition file /home/prkos/.inkscape/extensions/gdadin_setparams.inx.

** (inkscape:30154): WARNING **: Extension definition started with <inkscape-extension> instead of <extension:inkscape-extension>. Extension will not be created. See http://wiki.inkscape.org/wiki/index.php/Extensions for reference.

** (inkscape:30154): WARNING **: Unable to create extension from definition file /home/prkos/.inkscape/extensions/gdadin_render.inx.

** (inkscape:30154): WARNING **: Ignoring font without family that will crash Pango

There are no warnings with 0.46.

Thomas Holder (speleo3) wrote :

@prkos: your problem has nothing to do with this bug. Your files lack the xml namespace that was introduced after 0.46. See example INX code on http://wiki.inkscape.org/wiki/index.php/Extensions

prkos (prkos) wrote :

I guess you can count my comment out then, mark the bug as fixed if you think it is.

Thomas Holder (speleo3) on 2008-11-25
Changed in inkscape:
status: Confirmed → Fix Committed
tags: added: extensions-plugins
removed: extensions
ScislaC (scislac) on 2009-11-24
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers