OMERO-metadata fails on deletemap when well_to_images was set "yes"

Hi OME team,

On OMERO 5.4.10 (Ubuntu 16.04) I used the OMERO.metadata plugin to convert a Table annotation to a MapAnnotation (key-value pairs) using:

omero metadata populate --context bulkmap --cfg bulkmap-config.yml Screen:1601

and my bulkmap-config.yml file used the advanced feature:

# Advanced options (experimental)
# If a map-annotation is attached to a well also attach it to all images
# in the well
well_to_images: yes

When I then try to delete that MapAnnotation, I get:

sudard@graylab:~$ omero metadata populate --context deletemap Screen:1601
Using session for dsudar@omero:4064. Idle timeout: 10 min. Current group: GrayLab
INFO:omero.util.populate_metadata:Total MapAnnotationLinks in [‘’, ‘’]: 3780
Traceback (most recent call last):
File “/usr/local/bin/omero”, line 130, in
rv = omero.cli.argv()
File “/usr/local/OMERO/OMERO.server/lib/python/omero/”, line 1620, in argv
File “/usr/local/OMERO/OMERO.server/lib/python/omero/”, line 1095, in invoke
stop = self.onecmd(line, previous_args)
File “/usr/local/OMERO/OMERO.server/lib/python/omero/”, line 1172, in onecmd
self.execute(line, previous_args)
File “/usr/local/OMERO/OMERO.server/lib/python/omero/”, line 1254, in execute
File “/usr/local/OMERO/OMERO.server/lib/python/omero/plugins/”, line 493, in populate
ctx.write_to_omero(batch_size=args.batch, loops=loops, ms=ms)
File “/usr/local/OMERO/OMERO.server/lib/python/omero/util/”, line 1659, in write_to_omero
{"%sAnnotationLink" % objtype: batch}, loops, ms)
File “/usr/local/OMERO/OMERO.server/lib/python/omero/util/”, line 1668, in _write_to_omero_batch
delCmd, loops=loops, ms=ms, failontimeout=True)
File “/usr/local/OMERO/OMERO.server/lib/python/omero/”, line 899, in submit
File “/usr/local/OMERO/OMERO.server/lib/python/omero/”, line 918, in waitOnCmd
callback.loop(loops, ms) # Throw LockTimeout
File “/usr/local/OMERO/OMERO.server/lib/python/omero/”, line 256, in loop
5000L, int(waited))
omero.LockTimeout: exception ::omero::LockTimeout
serverStackTrace = None
serverExceptionClass = None
message = Command unfinished after 0.0 seconds
backOff = 5000
seconds = 0

Did I do anything wrong or is this a bug? Maybe stay away from that Advanced option for now?

Hi @dsudar ,

I am almost positive the error above is symptomatic of a known bug specific to the deletemap context. Can you try passing --wait 120 to the command?


Hi Sebastien,
Thanks for that quick response and yes, that worked. So it is indeed some kind of time-out issue as the error indicates? This works as a work-around.

Hi @dsudar,

formally, yes the server is throwing a time-out exception. However, looking at the implementation, the default command fails unless the server responds immediately. So, in practice, it is a really a bug in the default timeout passed in the deletion command.

I opened to discuss various options available to fix the default behavior of the command. Feel free to put your thoughts from the consumer perspective there.