Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling .connect() method on a suConn connection breaks queries #295

Open
glyg opened this issue Jul 12, 2021 · 0 comments
Open

calling .connect() method on a suConn connection breaks queries #295

glyg opened this issue Jul 12, 2021 · 0 comments

Comments

@glyg
Copy link
Contributor

glyg commented Jul 12, 2021

Context:
I pass a suConn connection as first argument to query methods decorated by an "auto_reconnect" decorator, so the suConn object's connect() method is called automatically. When doing that, queries for the datasets objects (and I assume others) silently return empty results.

Code example

This works

from omero.gateway import BlitzGateway
conn = BlitzGateway(host="localhost", username="root", passwd="omero", secure=True)
conn.connect()
suc = conn.suConn("john")
for dset in suc.getObjects('Dataset'):
   print(dset.name)

Ouput (as expected):

dataset1
dataset2

This bugs

from omero.gateway import BlitzGateway
conn = BlitzGateway(host="localhost", username="root", passwd="omero", secure=True)
conn.connect()
suc = conn.suConn("john")
# This returns True
suc.connect()
for dset in suc.getObjects('Dataset'):
    print(dset.name)

There is no output (no dataset is found)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant