[ome-users] No module named Ice

Paulo Almeida palmeida at igc.gulbenkian.pt
Thu Jan 14 16:58:18 GMT 2010


You can also see what the options for your version of su are. I'm on 
linux, so it may be different, but the man page for my su command says 
that '-' (as in 'su - bioviz') must be the last su option, and if that 
works I suppose you wouldn't even need to source .bashrc. I can also use 
-l or --login instead of '-'. There's also a -m, -p option to preserve 
environment, which could be useful.

- Paulo

Josh Moore wrote:
> The problem is that the environment settings from this script aren't
> getting passed into the shell of the "su" command. One solution would
> be to use two scripts:
> 
> ------------------------------------
> #!/bin/bash
> su - bioviz -c "/Users/bioviz/omero/current/launch_me.sh
> ------------------------------------
> 
> and then as launch_me.sh
> 
> -------------------------------------------------
> #!/bin/bash                                                                                                                            
> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
> export PATH=/opt/local/lib/postgresql84/bin:$PATH
> 
> export PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages:$PYTHONPATH
> export PYTHONPATH=/Users/bioviz/omero/current/lib/python:$PYTHONPATH
> 
> logger -s "PYTHONPATH: $PYTHONPATH"
> logger -s "PATH: $PATH"
> /Users/bioviz/omero/current/bin/omero admin start
> -------------------------------------------------
> 
> If, however, the login environment for bioviz contains those path
> settings (say they've been set in .bashrc), then you can also use:
> 
> ------------------------------------
> #!/bin/bash
> su - bioviz -c "source .bashrc &&
>    /Users/bioviz/omero/current/bin/omero admin start
> ------------------------------------
> 
> Cheers,
> ~Josh
> 
> Arcieri, Kenneth (NIH/NICHD) [V] writes:
>  > 
>  > Just to say, I installed this with macports and then moved omero folder to a different location later.
>  > 
>  > Here is the contents of the file:
>  > ------------------------------------------------------------------------------------------------------------------------------------------------------------
>  > #!/bin/bash                                                                                                                            
>  > export PATH=/opt/local/bin:/opt/local/sbin:$PATH
>  > export PATH=/opt/local/lib/postgresql84/bin:$PATH
>  > 
>  > export PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages:$PYTHONPATH
>  > export PYTHONPATH=/Users/bioviz/omero/current/lib/python:$PYTHONPATH
>  > 
>  > logger -s "PYTHONPATH: $PYTHONPATH"
>  > logger -s "PATH: $PATH"
>  > su - bioviz -c "/Users/bioviz/omero/current/bin/omero admin start"
>  > ------------------------------------------------------------------------------------------------------------------------------------------------------------
>  > 
>  > -Ken
>  > ________________________________________
>  > From: Josh Moore [josh at glencoesoftware.com]
>  > Sent: Thursday, January 14, 2010 11:13 AM
>  > To: Arcieri, Kenneth (NIH/NICHD) [V]
>  > Cc: ome-users at lists.openmicroscopy.org.uk
>  > Subject: Re: [ome-users] No module named Ice
>  > 
>  > Arcieri, Kenneth (NIH/NICHD) [V] writes:
>  > 
>  >  > I'm actually not directly calling bin/omero from my plist.  I've
>  > 
>  > Understood.
>  > 
>  >  > written a launch script because I know the environment need to be
>  >  > set.  I cannot figure out why the Ice module isn't getting loaded
>  >  > even when I'm setting the PYTHONPATH and the PATH identical to my
>  >  > terminal profile.
>  > 
>  > Hmmm... could you show us? Maybe someone will be able to pick up on
>  > a missing flag or similar.
>  > 
>  >  > Thanks for your continuing help.
>  >  > -Ken
>  > 
>  > Gladly,
>  > ~J.
>  > 
>  >  > ________________________________________
>  >  > From: Josh Moore [josh at glencoesoftware.com]
>  >  > Sent: Thursday, January 14, 2010 2:02 AM
>  >  > To: John Wallach
>  >  > Cc: ome-users at lists.openmicroscopy.org.uk
>  >  > Subject: Re: [ome-users] No module named Ice
>  >  >
>  >  > Ken,
>  >  >
>  >  > I would guess John is right. Can you maybe show us what you've done
>  >  > thus far? What does the launchd execute? And if it's a script of
>  >  > yours, what's in that script?
>  >  >
>  >  > Cheers,
>  >  > ~Josh
>  >  >
>  >  > John Wallach writes:
>  >  >
>  >  >  > I haven't seen this specifically because I haven't used OMERO on OS
>  >  >  > X but I bet that launchd isn't getting the environment variables
>  >  >  > that you have in your shell initiation scripts.
>  >  >  >
>  >  >  > Do you have the path variables set in the plist for OMERO? If not
>  >  >  > amend as in manpage:
>  >  >  > http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html#//apple_ref/doc/man/5/launchd.plist
>  >  >  >
>  >  >  > P.s Can someone modify the list so that the replyto address is the
>  >  >  > list rather than the poster's? Thanks!
>  >  >  >
>  >  >  > jmw
>  >  >  >
>  >  >  > On Wed, Jan 13, 2010 at 2:13 PM, Arcieri, Kenneth (NIH/NICHD) [V] <
>  >  >  > kenneth.arcieri at nih.gov> wrote:
>  >  >  >
>  >  >  > > When trying to start up the omero server with launchd I'm
>  >  >  > > receiving the error that the Ice module cannot be found.  Has
>  >  >  > > anyone run into this problem?  I'm having trouble troubleshooting
>  >  >  > > it because the pythonpat and path are both set and if i start the
>  >  >  > > server up manually it goes up no problem.
>  >  >  > >
>  >  >  > > Best,
>  >  >  > > Ken
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users



More information about the ome-users mailing list