Closed nickmalleson closed 3 years ago
Branch nickmalleson-issue-291 created!
There may have been no problem after all, but I added an os.path.join
here anyway as I think it's more reliable and it seems to work for me now
Hi @nickmalleson, can you provide a little bit more detail on this issue? The change to using os.path.join
is an absolutely sensible one but i'm not quite sure whether that will solve an underlying issue you've encountered.
Sorry for the confusion @Sparrow0hawk , I wasn't able to reproduce the original issue when I came to fix it. Basically at some point there was a line like cache_dir=os.path.join(data_dir, "/caches/")
; the slashes on caches
caused the path to be set to ROOT/caches. But when I came to fix it the line had been changed to string concatenation (something like cache_dir=data_dir +"/caches/")
) which works OK. I changed it to os.path.join
because I figured that was better practice anyway, but could not work out how I had found the original bug. Probably a mistake on my part with branch versions.
Population caches (
activity_locations.pkl
andindividuals.pkl
) are always re-read regardless of whether they exist or not