Incorrect python path in scripter

Bug #685625 reported by Philippe Clérié
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Scribus
Fix Released
Unknown
scribus-ng (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: scribus-ng

The python path in scripter is incorrect. It does include /usr/lib/python2.6 which is the second directory included in the standard path.

This is true for both 1.3.5 in Lucid and 1.3.8 in Maverick.

I happen to have 1.3.8 running in Fedora and it has the correct path.

How to reproduce:

Start Scribus
Open the scripter console
type:
   import sys
   sys.path

Press F9.
The bottom window has the path.

Revision history for this message
Philip Muškovac (yofel) wrote :

Looked at this a bit after the IRC discussion. It seems like the python C api on ubuntu sets sys.path[0] not to an empty string but to "/usr/lib/python2.6" which is sys.path[1] usually and scribus overwrites sys.path[0] with it's own include path when the scriptengine is initialized.
Could be solved by scribus using "sys.path.insert(0, \"%1\")\n" instead of "sys.path[0] = \"%1\"\n" in scribus/plugins/scriptplugin/scriptercore.cpp.
I don't know why sys.path for the C API would look different in ubuntu than elsewhere though.

Revision history for this message
Philippe Clérié (pclerie) wrote :

Additional note to the bug description:

There is a type: it should read << it does __NOT__ include /usr/lib/python2.6 >>

Apologies if people get confused.

Note to Philip:

Apparently, it's not just a packaging problem. Perhaps there's a patch somewhere that Fedora applied.

Revision history for this message
Kurt Mueller (tmpml) wrote :

This affects many people on ubuntu, no idea if it really is an ubuntu bug, or a scribus bug, it would just be nice to get it fixed (someplace).
Additional Places this shows up:
http://bugs.scribus.net/view.php?id=9756
http://bugs.scribus.net/view.php?id=9736
http://lists.scribus.info/pipermail/scribus/2011-February/042017.html

Changed in scribus:
status: Unknown → Fix Released
Revision history for this message
Kurt Mueller (tmpml) wrote :

Upstreem Status "Fix Released" seems not correct to me.
The status is "Status resolved Resolution no change required"
And the latest entry is a note from the bug submitter saying it is not fixed

Revision history for this message
Mattia Rizzolo (mapreri) wrote :

anyhow, it is not related to scribus but to python itself, as said in the comment.
And anyway, both Lucid and Maverick are EOL and now with scribus 1.4.2 and trusy this is fine.
Fix released.

Changed in scribus-ng (Ubuntu):
status: New → 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.