Line breaks in descriptions via CLI

Hi all,
I am almost new to Omero, and currently trying to use CLI for moving a number of slides (SVS) to a docker install of Omero. Is there any way to have line breaks inside descriptions when setting them via
omero obj update Dataset:XXX description="text with some line breaks inside" ?


Hi Vincenzo,

interesting question! Unfortunately, it doesn’t look to be the case. I’ve tried a few different methods like`$‘A\nB’ but it seems to always be stripped out.

If no one else has an immediate idea, it may be simplest to use a small script for this one action.


Thanks, I too tried some common sense options, but no way. Do you mean a python script?

Yes, exactly. With a minimum of boilerplate, you should be able to pass text with a newline (…while we try to figure out what’s going on! :wink:)

The Python API was one of the two rabbit holes I wanted to avoid at least at the beginning to make it easy, but I suppose it would be the best way to do everything…

Hi Vincenzo,

I need to do some more testing, but if you want to try it out locally:

(omero) /opt/omero-py $git diff
diff --git a/src/omero/plugins/ b/src/omero/plugins/
index e971ccb2..8e4eb20d 100755
--- a/src/omero/plugins/
+++ b/src/omero/plugins/
@@ -43,7 +43,7 @@ class TxField(object):

     ARG_RE = re.compile((r"(?P<FIELD>[a-zA-Z][a-zA-Z0-9]*)"
-                         "(?P<VALUE>.*)"))
+                         "(?P<VALUE>.*)"), re.MULTILINE|re.DOTALL)

     def __init__(self, tx_state, arg):
         self.tx_state = tx_state

seems to pass a newline from $'foo\nbar'.


see: Bug: `obj update` strips newlines by joshmoore · Pull Request #279 · ome/omero-py · GitHub


superquick! Thanks.
But I am the bottleneck… until now I worked directly inside the docker example install (the second rabbit hole, serious installation of everything ), and I do not know (yet) where to put hands really, except for the CLI usage.

The easiest method to modify the code in the docker would likely be to create your own DOCKERFILE based on the production docker image in which you pip install from my branch.

That being said, we’ll try to get the production version updated as soon as possible.

All the best,