ome / omero-figure

An OMERO.web app for creating Figures from images in OMERO
http://figure.openmicroscopy.org
GNU Affero General Public License v3.0
15 stars 31 forks source link

Can't enable figure export #565

Closed jo-mueller closed 5 months ago

jo-mueller commented 5 months ago

Dear OMERO-figure team,

I was recently playing with OMERO figure a bit and I am super impressed with the features. I was then trying to enable the export as described in the docs here but couldn't get it to work. Here is how I tried to set it up:

  1. OMERO is running inside a docker container - I am logging into this container using docker exec -it <ID> bash
  2. I installed omero-figure using pip install -U omero-figure
  3. I navigated to the directory indicated by pip show omero-figure:
bash-5.1$ pip show omero-figure
Name: omero-figure
Version: 6.2.2
Summary: OMERO figure creation app
Home-page: https://github.com/ome/omero-figure
Author: The Open Microscopy Team
Author-email: ome-devel@lists.openmicroscopy.org.uk
License: AGPL-3.0
Location: /opt/omero/server/.local/lib/python3.9/site-packages
Requires: omero-web
Required-by:
  1. I navigated to the location: cd /opt/omero/server/.local/lib/python3.9/site-packages
  2. I navigated to the scripts directory: cd omero_figure/scripts
  3. Tried to upload the script with omero script upload omero/figure_scripts/Figure_To_Pdf.py --official and received this error:
    bash-5.1$ omero
    bash: omero: command not found

which indicates that the omero command is somehow not available to the default omero-server user. I tried to log in as root, but I don't know the default root password. I use the setup from this repo as starting point, where a ROOTPASS variable is set, but I can't log in with it. But I'm not sure that this is a docker issue.

Anyway, some directions on how to fix would be really helpful - I would be happy to add a short note to the docs in a PR if something new is to be learned from this :)

Best, Johannes

will-moore commented 5 months ago

Hi, probably the easiest is to use the webclient to upload the script. Download the script from e.g. https://github.com/ome/omero-figure/blob/v6.2.2/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py (using the correct version of the script to match your installation of figure) or somehow get the one from inside your Docker to somewhere you can upload it to a web page. Then, log into the webclient as an Admin user and under the scripts menu choose to upload. You'll get a dialog where you need to choose the folder omero/figure_scripts (which should be in the "Choose Folder" options. Then just Choose File and pick the script you downloaded. Screenshot 2024-06-07 at 11 20 14

You'll need to do the same to replace the script with a new version when you update the figure app. Hope that helps, Will

jo-mueller commented 5 months ago

@will-moore thanks for the help, worked like a charm. Would you mind if I sent a PR with a short note as Option 3 for the docs of omero-figure?

will-moore commented 5 months ago

Please do, thanks!