<div dir="ltr">We are having some issues getting Mapproxy to reference our S3 cache we created and following the example at <a href="https://mapproxy.org/docs/nightly/caches.html#s3">https://mapproxy.org/docs/nightly/caches.html#s3</a>. We have tested to make sure that we can access our S3. We have installed Boto3. Do we need to execute/import Boto3 into Mapproxy somehow? It wasn't clear in the documentation if there was any other configuration like a BOTO3 session somewhere.<br><br>We are using a clean install of mapproxy - only changing the relevant portion to try and get S3 working:<br><br><pre><br>services:<br> demo:<br> tms:<br> use_grid_names: true<br> # origin for /tiles service<br> origin: 'nw'<br> kml:<br> use_grid_names: true<br> wmts:<br> wms:<br> srs: ['EPSG:4326', 'EPSG:3857', 'CRS:84', 'EPSG:900913', 'EPSG:102100', 'EPSG:102113', 'EPSG:2229', 'EPSG:2230', 'EPSG:26911', 'EPSG:26915']<br> max_output_pixels: [10000, 10000]<br><br>layers:<br> - name: s3_test_layer<br> title: S3 Test Layer<br> sources: [S3_Test_Cache]<br> md:<br> abstract: RGB [2017]<br><br>cache:<br> S3_Test_Cache:<br> grids: [webmercator_20]<br> sources: [S3_Test_rgbp_tms, S3_Test_rgbj_tms]<br> format: mixed<br> request_format: image/png<br> disable_storage: true<br> cache:<br> type: s3<br> directory: /s3_src/<br> bucket_name: test_bucket<br><br>sources:<br> S3_Test_rgbj_tms:<br> type: tile<br> url: /s3_src/rgb/%(z)s/%(x)s/%(y)s.jpg<br> coverage:<br> bbox: [-117.207,33.4322,-117.055,33.5544]<br> bbox_srs: 'EPSG:4326'<br> grid: mercator_20<br> transparent: true<br> S3_Test_rgbp_tms:<br> type: tile<br> url: /s3_src/rgb/%(z)s/%(x)s/%(y)s.png<br> coverage:<br> bbox: [-117.207,33.4322,-117.055,33.5544]<br> bbox_srs: 'EPSG:4326'<br> grid: mercator_20<br> transparent: true<br><br>grids:<br> webmercator:<br> base: GLOBAL_WEBMERCATOR<br> webmercator_20:<br> base: GLOBAL_WEBMERCATOR<br> num_levels: 21<br><br>globals:<br> cache:<br> s3:<br> profile_name: default<br></pre><div><br><br>We are using apache2 and mod_wsgi - here are the error logs when we hit the server:</div><div><br></div><div><div>mod_wsgi (pid=34395): Target WSGI script '/var/www/mapproxy/config.py' cannot be loaded as Python module.</div><div>mod_wsgi (pid=34395): Exception occurred processing WSGI script '/var/www/mapproxy/config.py'.</div><div>Traceback (most recent call last):</div><div> File "/var/www/mapproxy/config.py", line 10, in <module></div><div> application = make_wsgi_app(r'/var/www/mapproxy/mapproxy.yaml')</div><div> File "/usr/local/lib/python2.7/dist-packages/mapproxy/wsgiapp.py", line 105, in make_wsgi_app</div><div> conf = load_configuration(mapproxy_conf=services_conf, ignore_warnings=ignore_config_warnings)</div><div> File "/usr/local/lib/python2.7/dist-packages/mapproxy/config/loader.py", line 1957, in load_configuration</div><div> raise ConfigurationError(ex)</div><div> ConfigurationError: while scanning for the next token</div><div> found character that cannot start any token</div><div> in "/var/www/mapproxy/mapproxy.yaml", line 45, column 10</div><div><br></div><div>Our configuration for S3 has grown dramatically as we have scoured the web for hints / information about how to get this working. The configuration was much simpler in the beginning so we may have to start by stripping down what we have in there-- hopefully with someone's help from here.</div><div><br></div><div>Thanks,</div><div>R Holloway</div><div><br></div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"></div></div></div></div></div></div>
</div></div>