Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMERO.web upgrade to Django 3.2 #29

Open
will-moore opened this issue Feb 18, 2022 · 8 comments
Open

OMERO.web upgrade to Django 3.2 #29

will-moore opened this issue Feb 18, 2022 · 8 comments
Assignees
Labels

Comments

@will-moore
Copy link
Collaborator

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 ome/omero-iviewer#399).

@abhamacher
Copy link

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
Copy link
Member

Akramhar commented Apr 3, 2022

@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

@strambc strambc added the High label Jul 15, 2022
@Akramhar
Copy link
Member

@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
Copy link

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
Copy link
Collaborator Author

The "label" micro-meta-app comes from

label = "micro-meta-app"

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
Copy link
Member

Akramhar commented Nov 8, 2022

@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
Copy link

goughes commented Aug 14, 2024

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

@Akramhar
Copy link
Member

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

label = "micro-meta-app"

to
label = "micro_meta_app" .

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants