ebbwdan wrote:One more question. When the script completes - I get an 'Error' link in the client the contents of which seems to be the output from the CLI. Is there a way to stop that happening?
Anything that goes to stderr will be assumed to be error output by the clients. You can redirect the stderr to a file using "---errs" (that's three hyphens).
Also, is there an easy OMERO way to get the ID of the newly imported image?
The ID of the Pixels object is returned on stdout. You can redirect it with "---file" (again 3) and then slurp it back in. For example, if you're using the CLI:
- Code: Select all
bin/omero hql -q --style=plain "select i.id from Pixels p join p.image as i where p.id = $(cat import.out)" | cut -f2 -d,
1
though this would be slightly easier in pure Python. Note: the "-q" argument can also be passed to the import to reduce stderr.
Cheers,
~Josh