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

Bug #197475 reported by Thomas Holder
4
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
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 :-)

Revision history for this message
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
Revision history for this message
Thomas Holder (speleo3) wrote :
Revision history for this message
Alexandre Prokoudine (alexandre-prokoudine) wrote :

Thanks, committed to trunk :-)

Changed in inkscape:
assignee: nobody → alexandre-prokoudine
importance: Undecided → Medium
milestone: none → 0.47
status: Confirmed → Fix Released
Revision history for this message
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
Revision history for this message
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.

Revision history for this message
Thomas Holder (speleo3) wrote :

committed to trunk with g_setenv

Revision history for this message
prkos (prkos) wrote :

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

Revision history for this message
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?

Revision history for this 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.

Revision history for this message
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

Revision history for this message
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)
Changed in inkscape:
status: Confirmed → Fix Committed
tags: added: extensions-plugins
removed: extensions
ScislaC (scislac)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.