WU-BIMAC / MicroMetaApp-Omero

This is a limited-functionality, beta - implementation of the integration of Micro-Meta App in the OMERO.web client
GNU General Public License v3.0
4 stars 2 forks source link

OMERO.web upgrade to Django 3.2 #29

Open will-moore opened 2 years ago

will-moore commented 2 years ago

Hi Alex, Head's up: https://www.openmicroscopy.org/2022/02/18/omeroweb-django-upgrade.html

But hopefully you may not have to do too much to use the updated omero-web when it is released (e.g. see changes for iviewer https://github.com/ome/omero-iviewer/pull/399).

abhamacher commented 2 years ago

Hi all,

I installed the new omero-web version together with the Django version 3.2.12 on our testserver today and encountered issues with the micro meta app plugin, which prevent the omero-web service to get started:

systemctl status omero-web.service omero-web.service - OMERO.web Loaded: loaded (/etc/systemd/system/omero-web.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2022-04-03 16:42:42 CEST; 1min 35s ago Process: 26476 ExecStart=/mnt/data/OMERO.venv/web_venv3/bin/omero web start (code=exited, status=1/FAILURE) Main PID: 1258 (code=exited, status=0/SUCCESS)

Apr 03 16:42:42 omero-cai-test omero[26476]: app_config = AppConfig.create(entry) Apr 03 16:42:42 omero-cai-test omero[26476]: File "/mnt/data/OMERO.venv/web_venv3/lib64/python3.6/site-packages/django/apps/config.py", line 255, in create Apr 03 16:42:42 omero-cai-test omero[26476]: return app_config_class(app_name, app_module) Apr 03 16:42:42 omero-cai-test omero[26476]: File "/mnt/data/OMERO.venv/web_venv3/lib64/python3.6/site-packages/django/apps/config.py", line 39, in init Apr 03 16:42:42 omero-cai-test omero[26476]: "The app label '%s' is not a valid Python identifier." % self.label Apr 03 16:42:42 omero-cai-test omero[26476]: django.core.exceptions.ImproperlyConfigured: The app label 'micro-meta-app' is not a valid Python identifier. Apr 03 16:42:42 omero-cai-test systemd[1]: omero-web.service: control process exited, code=exited status=1 Apr 03 16:42:42 omero-cai-test systemd[1]: Failed to start OMERO.web. Apr 03 16:42:42 omero-cai-test systemd[1]: Unit omero-web.service entered failed state. Apr 03 16:42:42 omero-cai-test systemd[1]: omero-web.service failed.

So there is definitely some adaptation needed.

Regards, Anna

Akramhar commented 2 years ago

@will-moore thank you for the heads-up I'm going to investigate the point this week

@abhamacher thank you for test, hopefully I can solve this by the end of the week and release it together with the new version of mma-omero

Akramhar commented 1 year ago

@abhamacher after a very long time I finally got around to update this version of our app too. the latest release (1.7.25-b1) should be pip install friendly (download the .tar.gz and run pip install on it, should copy all the necessary files) but I haven't had a chance to test on updated omero-web + django setup. It would be great if you would have time to run a quick test and see if the issue is resolved. In case its still open I'll setup a specific test env for that because atm we have not planned the upgrade of our server yet. thank you! :)

abhamacher commented 1 year ago

Hey,

thanks for the update! I downloaded and installed the new package, but unfortunately I keep getting the same message when trying to start omero-web:

(web_venv3) [omero-web@omero-cai-test site-packages]$ pip freeze [...] omero-microMetaApp==1.7.25 [...]

[root@omero-cai-test ~]# systemctl status omero-web.service ● omero-web.service - OMERO.web Loaded: loaded (/etc/systemd/system/omero-web.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Tue 2022-11-08 12:48:30 CET; 5s ago [...] Nov 08 12:48:30 omero-cai-test omero[26909]: app_config = AppConfig.create(entry) Nov 08 12:48:30 omero-cai-test omero[26909]: File "/mnt/data/OMERO.venv/web_venv3/lib64/python3.6/site-packages/django/apps/config.py", line 255, in create Nov 08 12:48:30 omero-cai-test omero[26909]: return app_config_class(app_name, app_module) Nov 08 12:48:30 omero-cai-test omero[26909]: File "/mnt/data/OMERO.venv/web_venv3/lib64/python3.6/site-packages/django/apps/config.py", line 39,...init Nov 08 12:48:30 omero-cai-test omero[26909]: "The app label '%s' is not a valid Python identifier." % self.label Nov 08 12:48:30 omero-cai-test omero[26909]: django.core.exceptions.ImproperlyConfigured: The app label 'micro-meta-app' is not a valid Python identifier. Nov 08 12:48:30 omero-cai-test systemd[1]: omero-web.service: control process exited, code=exited status=1 Nov 08 12:48:30 omero-cai-test systemd[1]: Failed to start OMERO.web. Nov 08 12:48:30 omero-cai-test systemd[1]: Unit omero-web.service entered failed state. Nov 08 12:48:30 omero-cai-test systemd[1]: omero-web.service failed.

It's basically equal to the error message I posted earlier this year. I don't know where this mentioned 'micro-meta-app' label comes from, as the omero config uses other labels as stated in your install guide, but I'm not familiar with django. So may setting up a test environment would be good idea to investigate this.

Sorry for the bad news! BR, Anna

will-moore commented 1 year ago

The "label" micro-meta-app comes from https://github.com/WU-BIMAC/MicroMetaApp-Omero/blob/ade916119575b0b0081cacf571441d6677dc1ac4/omero_microMetaApp/apps.py#L7

The error is "The app label '%s' is not a valid Python identifier." It seems that python identifiers can include underscore, but not a dash: - https://docs.python.org/3/reference/lexical_analysis.html#identifiers

Akramhar commented 1 year ago

@abhamacher thank you for taking the time to test it and for the report. @will-moore thank you for the pointer, that made my life so much easier. I'll fix this and release and a new version between today and tomorrow.

goughes commented 1 month ago

Hi, I'm wondering if there is still a plan to fix this label. Hitting the same issue on my omero server. Thanks!

Akramhar commented 1 month ago

Hi, yes but it's a bit in the back burner at the moment. I'm planning to go back to work on this after I release the new version of MMA. In the meantime, if I remember correctly, one of the possible workaround fix is to rename https://github.com/WU-BIMAC/MicroMetaApp-Omero/blob/ade916119575b0b0081cacf571441d6677dc1ac4/omero_microMetaApp/apps.py#L7 to label = "micro_meta_app".

Cheers