[ome-devel] FW: omero 4.0.3: omeroPy problem
b.gerritsen at nki.nl
b.gerritsen at nki.nl
Wed Jun 23 13:15:42 BST 2010
________________________________________
From: Bram Gerritsen
Sent: Wednesday, June 23, 2010 2:01 PM
To: Josh Moore
Subject: RE: [ome-devel] omero 4.0.3: omeroPy problem
Thanks Josh!
With your advice I was able to fix the omero 4.0.3 build AND I can now create an omero gateway instance in python. My apologies for not having spotted those tickets earlier as this was an already solved bug.
Kind Regards,
Bram
________________________________________
From: ome-devel-bounces at lists.openmicroscopy.org.uk [ome-devel-bounces at lists.openmicroscopy.org.uk] On Behalf Of Josh Moore [josh.moore at gmx.de]
Sent: Wednesday, June 23, 2010 1:16 PM
To: ome-devel at lists.openmicroscopy.org.uk
Subject: Re: [ome-devel] omero 4.0.3: omeroPy problem
On 6/23/10 11:23 AM, b.gerritsen at nki.nl wrote:
> Dear all,
>
> When building omero 4.0.3 on Ubuntu 10.04 I get a supposedly successful build, but no python (".py") files in the "dist/lib/python/" folder. Included in the attachment is the build log
>
This is most likely the same problem as #1334[1]. You might make the
same changes as in r4426[2] to see.
> I have naively tried to copy the python files from "components/tools/OmeroPy/target/" to the "dist/lib/python/" folder. This partially solves the problem, but I cannot create a gateway as shown below:
>
> PYTHONPATH=. python
> Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>> import omero
>>>> c = omero.client('wooki')
>>>> s = c.createSession('root', 'ome')
>>>> g = s.createGateway()
>>>>
> Traceback (most recent call last):
> File "<stdin>", line 1, in<module>
> File "omero_API_ice.py", line 4387, in createGateway
> return _M_omero.api.ServiceFactory._op_createGateway.invoke(self, ((), _ctx))
> RuntimeError: class ::omero::api::GatewayPrx is declared but not defined
>
>>>>
> The above problem remains, even when setting the pythonpath to the "dist/lib/python/" of a copy of omero 4.0.3 from another computer where the build DID produce python files in "dist/lib/python/". Could someone tell me what might be the problem?
>
This is an issue with forward-declarations in Ice. Use:
import omero
import omero_api_Gateway_ice
c = omero.client(...
s = c.createSession(...
g = s.createGateway()
> Kind Regards,
> Bram
>
> PS:
> As opposed to omero 4.0.3, the following python code does work for an omero 4.2 build on the very same system:
> Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>> import omero
>>>> c = omero.client('localhost')
>>>> s = c.createSession('root', 'ome')
>>>> g = s.createGateway()
>>>>
Right. You can see in OmeroPy/src/omero/all.py[3] that in newer versions
the library does that importing for you.
Cheers,
~Josh.
[1]https://trac.openmicroscopy.org.uk/omero/ticket/1344
[2]https://trac.openmicroscopy.org.uk/omero/changeset/4426
[3]https://trac.openmicroscopy.org.uk/omero/browser/trunk/components/tools/OmeroPy/src/omero/all.py
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
More information about the ome-devel
mailing list