MIgrate to docker; skin dose maps don't work

Issue #833 resolved
Ed McDonagh created an issue

Tried looking at RF study where pickle file had been copied in, brief flash of dose map interface, then spinning wheel, then nothing.

Tried again, fresh migration, no pickle files; same outcome.

Haven’t reviewed situation with fresh Docker install yet.

Comments (11)

  1. Ed McDonagh reporter

    Skin maps are working fine for current Docker install with migrated database, without migrating the skin maps.

    Will need to try again after migrating skin maps to see if that caused an issue.

    This will become irrelevant if issue #810 comes into this release; @wens , @Luuk , @David Platten , @Jonathan Cole do you think we should assume we keep the current skin maps for the 1.0 release?

  2. David Platten

    @Ed McDonagh , I have encountered a problem with my develop version on Windows. Skin dose maps don’t appear - it is just a blank.

    I have tracked the problem down. It is caused by how the MEDIA_ROOT setting is obtained.

    In make_skin_map.py there is a from openremproject.settings import MEDIA_ROOT.

    On my system this results in MEDIA_ROOT being set to the default in settings.py:D:\code\python\openrem\openrem\mediafiles

    In views.py first settings are imported, from django.conf import settings, and then settings.MEDIA_ROOT is used. This results in C:/pythonVirtualEnvs/media/, the MEDIA_ROOT defined in my local_settings.py file.

    The above means that skin dose maps are created, and put in the D:\code\python\openrem\openrem\mediafiles folder. When the view tries to load in a skin dose map pickle file it looks in C:/pythonVirtualEnvs/media/, so fails.

    We need to ensure that everywhere in the code MEDIA_ROOT is accessed via settings.MEDIA_ROOT, following a from django.conf import settings.

  3. David Platten

    I have just installed a Docker version of OpenREM using the up-to-date containers. Skin dose maps are created without a problem.

  4. Ed McDonagh reporter

    The MEDIA_ROOT issue has been dealt with at some point when the skin map code was reorganised I’m guessing. It is all good now, without merging in branch issue833skinDoseMapsInDocker.

    I’m going to mark this issue as fixed, and delete that branch. It has one commit with changes in, all of which are to the make_skin_map.py file for references to MEDIA_ROOT, and that file no longer has any as they have been factored out into save_skin_map_structure.py.

    I’ve checked, and I can’t see any other references to the wrong MEDIA_ROOT that are in use.

  5. Ed McDonagh reporter

    Resolved by: 1. Having a new version of skin map, so there is no point migrating the pickle files 1. MEDIA_ROOT settings have been fixed everywhere it is in use.

  6. Log in to comment