OMERO sessions in Google Colab?

Has anyone worked with OMERO in Colab?

I installed omero-py in Colab and tried to spin up an OMERO session with Blitzgateway boilerplate code and ran into this:

WARNING:omero.client:None - createSession retry: 1

One additional complication may be that our OMERO server requires OpenVPN authentication. I naively hoped that the Colab VM would have access through the local OpenVPN session.

Hi @jstitlow

After installing omero-py,
in order to connect, you will have to use websockets, I just tested it.
This is the same approach that the one we use with mybinder. see for example CalculateSharpnessOneImage.ipynb

The connection code will be something like.

from omero.gateway import BlitzGateway
from getpass import getpass
HOST = ‘wss://workshop.openmicroscopy.org/omero-ws’
conn = BlitzGateway(input("Username: "),
getpass("OMERO Password: "),
host=HOST, secure=True)
conn.connect()

You will need to have websocket configure on your OMERO server. See websockets.html

Cheers

Jmarie

Thanks Jean-Marie, will try this out.

Hi @jstitlow
I have opened a PR run in colab by jburel · Pull Request #32 · ome/omero-guide-python · GitHub
modifying the notebooks so they can be run either on mybinder or colab.
This will give you some indication
Cheers

Jmarie

The PR has now been reviewed and merged.
All the notebooks under omero-guide-python/notebooks at master · ome/omero-guide-python · GitHub can be run on mybinder or Colab.
Cheers

Jmarie