MIgrate to docker; skin dose maps don't work
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)
-
reporter -
reporter - changed component to openSkin
-
reporter Added restore instructions. Removed reference to skin map restore, as was problematic and irrelevant with new version. Refs #823,
#833[skip ci] docs only.→ <<cset 919708fd1918>>
-
@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 afrom openremproject.settings import MEDIA_ROOT
.On my system this results in
MEDIA_ROOT
being set to the default insettings.py
:D:\code\python\openrem\openrem\mediafiles
In
views.py
first settings are imported,from django.conf import settings
, and thensettings.MEDIA_ROOT
is used. This results inC:/pythonVirtualEnvs/media/
, theMEDIA_ROOT
defined in mylocal_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 inC:/pythonVirtualEnvs/media/
, so fails.
We need to ensure that everywhere in the code
MEDIA_ROOT
is accessed viasettings.MEDIA_ROOT
, following afrom django.conf import settings
. -
Changing how MEDIA_ROOT is imported when making a skin dose map. I think the same issue may affect import_views.py as well. Refs issue
#833→ <<cset 74c3f6c280cb>>
-
@Ed McDonagh do your skin dose maps work in Docker now I’ve made this change?
-
reporter I'll have a look at this when I’ve got the code in front of me.
-
I have just installed a Docker version of OpenREM using the up-to-date containers. Skin dose maps are created without a problem.
-
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 toMEDIA_ROOT
, and that file no longer has any as they have been factored out intosave_skin_map_structure.py
.I’ve checked, and I can’t see any other references to the wrong
MEDIA_ROOT
that are in use. -
reporter - changed status to resolved
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. -
reporter Removing unused imports highlighted when researching issue ref
#833→ <<cset 9aedac5bb926>>
- Log in to comment
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
#810comes 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?