<div dir="auto"><div dir="auto">I have finally resolved this issue. It was caused by our http proxy which adds accept-encoding:gzip to all requests. Thus all images were gziped and not readable by PIL.</div><div dir="auto"><br></div><div dir="auto">Some libraries can handle this by checking incoming headers and then decompress content if necessary. But this is not case of urllib2 used by mapproxy. </div><div dir="auto"><br></div><div dir="auto">So, make sure that your http proxy behaves as expected!</div><div dir="auto"><br></div><div dir="auto">Best regards David</div><div dir="auto"><br></div><div dir="auto"><br></div><br><div class="gmail_quote"><div dir="ltr">út 6. 11. 2018 15:08 odesílatel David Pavlíček <<a href="mailto:pavlicek.david@gmail.com" target="_blank" rel="noreferrer">pavlicek.david@gmail.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>I didn't think so...</div><div><a href="http://mpp.praha.eu/arcgis/services/DTMP/DTMP/MapServer/WMSServer?request=GetCapabilities&service=WMS" rel="noreferrer noreferrer" target="_blank">http://mpp.praha.eu/arcgis/services/DTMP/DTMP/MapServer/WMSServer?request=GetCapabilities&service=WMS</a> is working as expected. Also getmap request from debug session is working properly... There must be another issue...<br></div><div><br> </div></div></div><br><div class="gmail_quote"><div dir="ltr">út 6. 11. 2018 v 14:51 odesílatel Lukas Macur <<a href="mailto:lukas.macur@gmail.com" rel="noreferrer noreferrer" target="_blank">lukas.macur@gmail.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello, I believe the problem is on source site, that is not working <a href="http://mpp.praha.eu/arcgis/services/DTMP/DTMP/MapServer/WMSServer" rel="noreferrer noreferrer" target="_blank">http://mpp.praha.eu/arcgis/services/DTMP/DTMP/MapServer/WMSServer</a><div><a href="http://mpp.praha.eu/arcgis/services/DTMP/DTMP/MapServer/WMSServer" rel="noreferrer noreferrer" target="_blank">http://mpp.praha.eu</a> - is working, but the arcgis server services are not ok (<a href="http://mpp.praha.eu/arcgis/services/DTMP/DTMP/MapServer/WMSServer" rel="noreferrer noreferrer" target="_blank">http://mpp.praha.eu/arcgis/services</a>).</div><div><br></div><div>Regards,</div><div>LM</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">út 6. 11. 2018 v 13:42 odesílatel David Pavlíček <<a href="mailto:pavlicek.david@gmail.com" rel="noreferrer noreferrer" target="_blank">pavlicek.david@gmail.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div>did you solve that Issue? I'm experiencing pretty much the same problem. Our MapProxy yesterday starts to respond with: "error while processing image file: cannot identify image file <mapproxy.image.ReadBufWrapper object at 0x7f67d86e6c10></div><div><br></div><div>I reduce the config to simplest one possible, but with no luck. Error is still there. Our config is as follows:<br></div><div><br></div><div>services:<br> demo:<br> wms:<br> srs: ['EPSG:5514']<br>sources:<br> dtm_praha:<br> type: wms<br> req:<br> url: <a href="http://mpp.praha.eu/arcgis/services/DTMP/DTMP/MapServer/WMSServer" rel="noreferrer noreferrer" target="_blank">http://mpp.praha.eu/arcgis/services/DTMP/DTMP/MapServer/WMSServer</a>?<br> transparent: true<br> layers: 0,1,2,3<br><br>layers:<br> - name: DTMP<br> title: DTMP<br> sources: [dtm_praha]<br>globals:<br> image: <br> resampling_method: bilinear</div><div><br></div><div>We are running MapProxy under Apache2 on Debian Linux behind HTTP proxy. Packages up to date. I also try to run developlment server with that config. And output is:</div><div><br></div><div>[2018-11-06 13:21:31,681] mapproxy.source.request - INFO - GET <a href="http://mpp.praha.eu/arcgis/services/DTMP/DTMP/MapServer/WMSServer?styles=&format=image%2Fpng&height=899&bbox=-749443.5125,-1052941.0375,-749412.1875,-1052918.5625&transparent=True&layers=0,1,2,3&service=WMS&srs=EPSG%3A5514&request=GetMap&width=1253&version=1.1.1" rel="noreferrer noreferrer" target="_blank">http://mpp.praha.eu/arcgis/services/DTMP/DTMP/MapServer/WMSServer?styles=&format=image%2Fpng&height=899&bbox=-749443.5125,-1052941.0375,-749412.1875,-1052918.5625&transparent=True&layers=0,1,2,3&service=WMS&srs=EPSG%3A5514&request=GetMap&width=1253&version=1.1.1</a> 200 10.0 330<br>[2018-11-06 13:21:31,689] mapproxy.image - DEBUG - converting image from ImageOptions(encoding_options={}, resampling='bilinear', transparent=True) -> ImageOptions(bgcolor='#ffffff', colors=256, encoding_options={}, format='image/png', resampling='bilinear', transparent=True)<br>[2018-11-06 13:21:31,689] mapproxy.image - DEBUG - file(<mapproxy.image.ReadBufWrapper object at 0x7f67d86e6c10>) -> image<br>[info] 10.144.35.192 - - [06/Nov/2018 13:21:31] "GET /wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=DTMP&CRS=EPSG%3A5514&STYLES=&WIDTH=1253&HEIGHT=899&BBOX=-749443.5125000001%2C-1052941.0375%2C-749412.1875000001%2C-1052918.5625 HTTP/1.1" 200 -</div><div><br></div><div>But WMS response contains no image, only XML describing error mentioned above. <br></div><div><br></div><div>Any advices? <br></div><br><div class="gmail_quote"><div dir="ltr">st 4. 7. 2018 v 15:32 odesílatel Sebastijan Sekulić <<a href="mailto:sebastijan.sekulic@gmail.com" rel="noreferrer noreferrer" target="_blank">sebastijan.sekulic@gmail.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br>so I am trying to add a WMS source to my MapProxy, but on the demo page, I get an error.<br>Error while processing image file: cannot identify image file <mapproxy.imageReadBufWrapper objerct at 0x7fbed4360f50>.<br><br>I have tracked the error to Line 153 in wms.py (It stops at result_bf = result.as_buffer(img_opts)), if that helps. I think it should be something with pillow having a problem with the image format, but I don't have expertise in that.<div><br></div><div>I don't get any console outputs except request (no errors).<br><br>If I make a request with postman or with requests, it renders and downloads properly. The image format is png8, and I am using MapProxy 1.11 on Ubuntu.</div><div><br></div><div>If you need .yaml and request, I can provide as a download link or send privately, as I don't want to expose source links.<br><br>Thanks,<br>Seb.</div></div>
_______________________________________________<br>
MapProxy mailing list<br>
<a href="mailto:MapProxy@lists.osgeo.org" rel="noreferrer noreferrer" target="_blank">MapProxy@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapproxy</a></blockquote></div></div></div></div></div>
_______________________________________________<br>
MapProxy mailing list<br>
<a href="mailto:MapProxy@lists.osgeo.org" rel="noreferrer noreferrer" target="_blank">MapProxy@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapproxy</a></blockquote></div>
</blockquote></div>
</blockquote></div></div>