Page 1 of 2

database initialization

PostPosted: Thu Sep 10, 2009 12:35 pm
by gilles
Hi there,
I'm new to OMERO
I actually try to install Omero.server on my pc (windows xp) as localhost.
I follow the installation procedure as describe on the site (http://www.openmicroscopy.org/site/supp ... ll-windows)
everything seems to be alright, I get no error, but when I finally try to initialize the omero database with the command line "bin\omero db script" I have the following message :
" File "bin\omero", line 19
print "OMERO directories belong to root"

syntaxError: invalid syntax

does anyone know where is the problem ?

Thanks

Re: database initialization

PostPosted: Thu Sep 10, 2009 2:32 pm
by jmoore
Hi gilles,

this is quite odd. What version of python do you have installed?
Code: Select all
python -V


And what happens if you try to run:
Code: Select all
python bin\omero db script


Cheers, ~Josh.

Re: database initialization

PostPosted: Thu Sep 10, 2009 3:38 pm
by gilles
hi,
first I've installed python 2.5.4.4 but the error was :

Traceback <most recent call last>:
File "bin\omero", line 67, in <module>
import omero.cli
File "C:\omero_dist\lib\python\omero\__init__.py", line 14, in <module>
import Ice, Glacier2

ImportError: No module named Ice

...
So I've installed the 3.1.1.2 version... :?

Re: database initialization

PostPosted: Thu Sep 10, 2009 3:54 pm
by jmoore
What Ice version did you install? The most current is 3.3.1. Are things working for you now?

Re: database initialization

PostPosted: Fri Sep 11, 2009 7:09 am
by gilles
my ice version is 3.3.1
there is no evolution... shall I do reinstall python2.5.4.4 or 2.6.2.2 ? If I find the ice module it will be alright no ?

Re: database initialization

PostPosted: Fri Sep 11, 2009 10:38 am
by cblackburn
Hi Gilles,

It's important that the PYTHONPATH which points to the Ice Python libs is a System environment variable (and not a User one) Can you check you have that System variable set?

Colin

Re: database initialization

PostPosted: Fri Sep 11, 2009 11:11 am
by gilles
Hi Colin,
my system variables are :

path
C:\Python31\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Fichiers communs\Roxio Shared\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft Visual Studio 8\VC\vcpackages;C:\Program Files\QuickTime\QTSystem\;%VDMSPath%\;C:\Ice-3.3.1\bin

pythonpath
C:\Ice-3.3.1\bin

Re: database initialization

PostPosted: Fri Sep 11, 2009 12:38 pm
by cblackburn
Hi Gilles,

Can you check whether the PYTHONPATH is System or User variable?

Settings --> Control Panel, open it and navigate to the Advanced Tab. Click Environment Variables. Is PYTHONPATH specified in the lower System panel or the upper User Panel? It needs to be set in the lower one.

Cheers,

Colin

Re: database initialization

PostPosted: Fri Sep 11, 2009 1:28 pm
by gilles
I confirm,
the PYTHONPATH is in System variable

pythonpath
C:\Ice-3.3.1\bin

Re: database initialization

PostPosted: Fri Sep 11, 2009 1:37 pm
by gilles
that 's an extract of the file omero_dist\bin\omero :

#!/usr/bin/env python

"""

:author: Josh Moore <josh@glencoesoftware.com>

Python driver for OMERO
Copyright (c) 2007, Glencoe Software, Inc.
See LICENSE for details.

"""
import sys, os, stat

def not_root(omero):
try:
if os.geteuid() == 0:
owner = os.stat(omero)[stat.ST_UID]
if owner == 0:
print "OMERO directories belong to root"

the error occurs at this last line. "syntaxError: invalid syntax"