bayesimpact / encompass

Bayes Impact's Encompass Tool for Visualizing and Analyzing Geographic Access
https://encompass.bayes.org
Apache License 2.0
26 stars 7 forks source link

Backend methods not available in explorer #636

Closed tetraptych closed 6 years ago

tetraptych commented 6 years ago

The explorer cannot use the backend methods, even with correct folder mounting in docker-compose.yaml.

Certain hard-coded paths fail:

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-1-1f538274a3ba> in <module>()
     10 
     11 from backend.config import config
---> 12 from backend.lib.fetch import representative_points
     13 from backend.lib.database.postgres import connect
     14 from backend.lib.calculate import adequacy

~/work/backend/lib/fetch/representative_points.py in <module>()
     23 
     24 if config.get('census_data'):
---> 25     CENSUS_FIELDS_BY_CATEGORY = json.load(open(config.get('census_mapping_json')))
     26 else:
     27     CENSUS_FIELDS_BY_CATEGORY = {}

FileNotFoundError: [Errno 2] No such file or directory: '/app/shared/census_mapping.json'
ericboucher commented 6 years ago

@tetraptych is that done?