My script upload images to omero and before doing so checks based on the location from where the image was uploaded if the image is already in omero - this code does find images for a project name that has spaces in it and returns an omero_id:
- Code: Select all
print "\nList Projects:"
print "=" * 50
my_expId = conn.getUser().getId()
for project in conn.listProjects(my_expId):
print_obj(project)
for dataset in project.listChildren():
print_obj(dataset, 2)
for image in dataset.listChildren():
#print_obj(image, 4)
fileset = image.getFileset()
print 'fileset=', fileset
if fileset is not None:
print 'image id=', image.getId()
filesetId=fileset.getId()
query = 'SELECT clientPath FROM FilesetEntry WHERE fileset.id = :id'
params = omero.sys.ParametersI()
params.addId(omero.rtypes.rlong(filesetId))
for path in conn.getQueryService().projection(query, params):
fullPath=path[0].val
if splitString in fullPath:
print 'path in omero=' +fullPath
relativeOmeroUrl=fullPath.split(splitString,1)[1]
print "adding to hash relative omero url="+relativeOmeroUrl
alreadyInOmero.add(relativeOmeroUrl)
However when I look in omero using either the web client or the insight client the project is empty?
So i'm guessing this is a client issue?? is the answer just not use any paths/project names with a space in them?
Cheers
Jonathan.