id

51

title
sat can't find its module if installed as private modules
reporter
Thomas Preud'homme
created
01/08/2013, 14:44
updated
15/09/2014, 12:57
labels
Backend
type
bug
status
queued
priority
normal
milestone
0.7
severity
minor
body

When sat files are installed as private modules (e.g. in /usr/share/salutatoi), sat.tac is unable to find sat modules because sys.path is set to /usr/bin by twisted. This patch set the PYTHONPATH environment variable before running twisted so that sat modules can be found by sat.tac. See attached for a patch fixing this issue.

comments_uri
xmpp:pubsub.goffi.org?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%2Forg.salut-a-toi.tickets%3A0_51

Click to reduce…

Created attachment 5 Support installing .py files as private modules in /usr/share When sat files are installed as private modules (e.g. in /usr/share/salutatoi), sat.tac is unable to find sat modules because sys.path is set to /usr/bin by twisted. This patch set the PYTHONPATH environment variable before running twisted so that sat modules can be found by sat.tac.

Click to expand… Click to reduce…

Click to reduce…

Good that I forgot to attach the patch since it was incomplete. See an updated version.

Click to expand… Click to reduce…

Click to reduce…

Created attachment 11 New version of the patch Thomas' patch doesn't apply any more with 0.5, since both sat.sh and setup.py changed substantially. Please find the updated patch that we integrated in the Debian package.

Click to expand… Click to reduce…

Click to reduce…

G'day, thank for your patch but it's not OK yet for me (as discussed on the dev@ mailing list), here is a copy/paste of my comment: ### This one is not OK for me: it erase the PYTHONPATH when SàT is launched from the repository (i.e. without installation), and force it when SàT is installed. This is bad because PYTHONPATH is dependant of the way we want to launch SàT, for example I have two scripts: sat and sat_dev which launch SàT with different PYTHONPATH (the one for my main instance, and the one for the dev version, as explained here: http://wiki.goffi.org/wiki/Howto_launch_several_S%C3%A0T_instances); with you patch the scripts would not work anymore. As I'm not sure of the issue that you have, can you attach a complete backtrace to the bug report ? It's also better to continue the discussion there because else it will be difficult to track bug history. ### So please attach a copy of your exception, and if possible a ls of SàT installation to know exactly where module are, and a copy of your PYTHONPATH at the launch. There is not sat.tac anymore since SàT 0.5, it's now a twisted plugin. Cheers and thanks for your report/help.

Click to expand… Click to reduce…

You are not logged. You need to log in to comment.