[ome-users] OMERO Figure Download

William Moore (Staff) W.Moore at dundee.ac.uk
Wed Nov 1 12:23:49 GMT 2017


Hi Steve,

 I’m afraid we don’t support token authentication yet, although we have been discussing it…
https://trello.com/c/CbRYR7Ty/34-session-issues
I’ve added your request to that card.

The next best thing you can do is to use an existing session ID to join a session (like a short-lived token).

You can get a session key when you login from the command line
$ bin/omero login

Or if you’re already logged-in, you can do
$ bin/omero sessions key

Then use that in your script to connect.

conn = BlitzGateway(host="localhost", port=4064)
conn.connect(SESSION_ID)

I updated https://gist.github.com/will-moore/d448a7abd57425734aba426f0952eff6
to show this.

It would be better to add command line arguments to your script instead of
hard-coding it.

Regards,

  Will.



On 31 Oct 2017, at 11:48, Stephen Taylor <stephen.taylor at imm.ox.ac.uk<mailto:stephen.taylor at imm.ox.ac.uk>> wrote:

Hi Will,

Sorry for my slow reply. I haven’t been able to reproduce this as again so may be just a blip when the machine is under load. I have noticed some of the PDFs don’t download and when I look at the ids in OMERO.figure it says ‘Data missing’. Does this mean that an image has been removed from a database which is breaking things?

On another note, does OMERO support token based authentication? There has been a concern from sys admins here that we are logging in with a username and password every time.

Thanks,

Steve



From: ome-users [mailto:ome-users-bounces at lists.openmicroscopy.org.uk] On Behalf Of William Moore (Staff)
Sent: 24 October 2017 10:39
To: OME User Support List <ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>>
Subject: Re: [ome-users] OMERO Figure Download

Hi Steve,

 I tried a simple modification to my script to export and download a handful of figures
sequentially, and this seemed to work OK.
Could you share your script and give us an idea of how many figures you
can export before you see this ConnectionRefusedException?

Also, any other info you think might be relevant?
Timing of export (do the figures contain large numbers of images), reproducibility of
this issue (do you always get this error at the same point, or just occasionally) etc.

 Thanks,

  Will.



On 20 Oct 2017, at 16:34, Stephen Taylor <stephen.taylor at imm.ox.ac.uk<mailto:stephen.taylor at imm.ox.ac.uk>> wrote:

Hi,

Ah. Spoke to soon.

Got an new error when I set a batch job to run multiple figures.

Waiting....
Traceback (most recent call last):
  File "figure2png.py", line 88, in <module>
    while proc.poll() is None:
  File "/opt/OMERO.py-5.3.5-ice35-b73/lib/python/omero_Scripts_ice.py", line 691, in poll
    return _M_omero.grid.Process._op_poll.invoke(self, ((), _ctx))
Ice.UnknownLocalException: exception ::Ice::UnknownLocalException
{
    unknown = Network.cpp:2381: Ice::ConnectionRefusedException:
connection refused: Connection refused
}

Any idea?

Steve

From: ome-users [mailto:ome-users-bounces at lists.openmicroscopy.org.uk] On Behalf Of Stephen Taylor
Sent: 20 October 2017 14:04
To: OME User Support List <ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>>
Subject: Re: [ome-users] OMERO Figure Download

Hi Will,

Thanks! This seems to fix things.

Steve

From: ome-users [mailto:ome-users-bounces at lists.openmicroscopy.org.uk] On Behalf Of William Moore (Staff)
Sent: 17 October 2017 11:37
To: OME User Support List <ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>>
Subject: Re: [ome-users] OMERO Figure Download

Hi Steve,

 I think you must have also updated OMERO.figure too, since the return key changed in OMERO.figure 3.1.0:
https://github.com/ome/omero-figure/commit/6d07fc88

You now need to use “New_Figure” everywhere instead of “File_Annotation”).
Apologies for not anticipating that this would be a breaking change.

I’ll update the gist.

 Hope that works,

 Regards,

   Will.



On 17 Oct 2017, at 08:27, Stephen Taylor <stephen.taylor at imm.ox.ac.uk<mailto:stephen.taylor at imm.ox.ac.uk>> wrote:

Hi,

Earlier this year Will kindly helped me write a script to download data from OMERO figure (seehttps://gist.github.com/will-moore/d448a7abd57425734aba426f0952eff6).

Our OMERO server just got updated to version 5.3.5.  Now line 53, if rv.get('File_Annotation'):, returns None so it never gets to the download step. Please can someone advise how I can debug this because AFAIK the figures look ok and I am a bit stuck what to do next.

I am using running the script on Ubuntu and using the OMERO.py-5.3.5-ice35-b73 libs.

Kind regards and thanks,

Steve
----------------------------------
Head of Computational Biology Research Group
MRC Weatherall Institute of Molecular Medicine
Oxford
www.cbrg.ox.ac.uk<http://www.cbrg.ox.ac.uk/>

_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


The University of Dundee is a registered Scottish Charity, No: SC015096
_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


The University of Dundee is a registered Scottish Charity, No: SC015096
_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20171101/61d5ac5f/attachment.html>


More information about the ome-users mailing list