Skip to content
New issue

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

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

Already on GitHub? # to your account

django can't find slicer #1

Open
SaibotMagd opened this issue Mar 8, 2024 · 0 comments
Open

django can't find slicer #1

SaibotMagd opened this issue Mar 8, 2024 · 0 comments

Comments

@SaibotMagd
Copy link

SaibotMagd commented Mar 8, 2024

Hi, it seems like there at least 2 issues, so this proof-of-concept can't work:

  • without any changes django can't find slicer:
    `
    DEBUG:omeroweb.settings:INSTALLED_APPS=[('django.contrib.staticfiles', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'omero_figure', 'omero_iviewer', 'omero_mapr', 'omero_parade', 'omero_autotag', 'omero_tagsearch', 'slicer', 'corsheaders', 'omeroweb.feedback', 'omeroweb.webadmin', 'omeroweb.webclient', 'omeroweb.webgateway', 'omeroweb.webredirect', 'omeroweb.api', 'pipeline')]
    Traceback (most recent call last):
    File "/opt/omero/web/venv3/lib/python3.9/site-packages/omeroweb/manage.py", line 81, in
    execute_from_command_line(sys.argv)
    File "/opt/omero/web/venv3/lib64/python3.9/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
    utility.execute()
    File "/opt/omero/web/venv3/lib64/python3.9/site-packages/django/core/management/init.py", line 416, in execute
    django.setup()
    File "/opt/omero/web/venv3/lib64/python3.9/site-packages/django/init.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
    File "/opt/omero/web/venv3/lib64/python3.9/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
    File "/opt/omero/web/venv3/lib64/python3.9/site-packages/django/apps/config.py", line 193, in create
    import_module(entry)
    File "/usr/lib64/python3.9/importlib/init.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "", line 1030, in _gcd_import
    File "", line 1007, in _find_and_load
    File "", line 984, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'slicer'

`

But why does django even look at this python3.9 env as the path in "docker-compose.yml" looks like:

omeroweb: # This container uses the tag for the latest web release of OMERO 5 # To upgrade to the next major release, increment the major version number image: "openmicroscopy/omero-web-standalone:5.23.0" container_name: omeroweb_docker environment: OMEROHOST: omeroserver networks: omero: ipv4_address: 172.20.0.3 ports: - "4080:4080" volumes: - "/home/cni/slicer-omero/omero_web_extension_volume:/opt/omero/web/venv3/lib/python3.6/site-packages/slicer" #Replace > - "/home/cni/slicer-omero/omero_web_conf_volume/config.omero:/opt/omero/web/config/config.omero" #Replace the first dir> - "/home/cni/slicer-omero/slicer_volume:/home/Documents/slicer_volume" #Replace the first directory with its volume.Thi>

So you can replace the environment with "python3.9" and it will work. But it still can't write into the "/home/cni/slicer-omero/slicer_volume/ids/" folder to write the temporary json file. Therefore the container must be given access rights to this folder.

Also it seems like django 4.0 can't use the url function anymore, so I had to change it to another command:
Screenshot from 2024-03-08 13-53-40

After all of these steps, you can start 3d-slicer from omero but it shows no image at all...

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

No branches or pull requests

1 participant