Upgrading Mapproxy and PIL to 1.4.0 resp 1.1.7 did not help either :(<br><br>Some more information: After upgrading, the error message is a bit more precise:<br>unable to load tile <mapproxy.image.ImageSource object at 0x7fac30036750>, removing it (reason was: broken data stream when reading image file)<br>
<br>I still have no idea how to fix this, as I can't reproduce the error when I try to access the same file with PIL from command-line.<br><br>Here is my test yaml:<br>services:<br>  demo:<br>  kml:<br>  tms:<br>    # needs no arguments<br>
  wms:<br>    srs: ['EPSG:2169']<br>    image_formats: ['image/jpeg','image/png']<br>    md:<br>      # metadata used in capabilities documents<br>      title: MapProxy WMS Proxy<br>      abstract: This is the fantastic MapProxy.<br>
      online_resource: <a href="http://mapproxy.org/">http://mapproxy.org/</a><br>      contact:<br>        person: Your Name Here<br>        position: Technical Director<br>        organization: <br>        address: Fakestreet 123<br>
        city: Somewhere<br>        postcode: 12345<br>        country: Germany<br>        phone: +49(0)000-000000-0<br>        fax: +49(0)000-000000-0<br>        email: <a href="mailto:info@omniscale.de">info@omniscale.de</a><br>
      access_constraints:<br>        This service is intended for private and evaluation use only.<br>        The data is licensed as Creative Commons Attribution-Share Alike 2.0<br>        (<a href="http://creativecommons.org/licenses/by-sa/2.0/">http://creativecommons.org/licenses/by-sa/2.0/</a>)<br>
      fees: 'None'<br><br>layers:<br>  - name: OSM_MQ<br>    title: OSM_MQ<br>    sources: [osm_cache_mq]<br>  <br>grids:<br>  global_mercator_osm:<br>    base: GLOBAL_MERCATOR<br>    num_levels: 18 <br>    origin: nw<br>
    srs: EPSG:900913    <br>    <br>caches:<br>  osm_cache_mq:<br>    grids: [global_mercator_osm]<br>    sources: [osm_tms_mq]  <br>    disable_storage: true<br>    format: image/png    <br>    cache:<br>      type: mbtiles<br>
      filename: /tmp/osm_mq.mbtiles<br>      <br><br>sources:<br>  osm_tms_mq:<br>    type: tile<br>    url: <a href="http://otile1.mqcdn.com/tiles/1.0.0/osm/%(tms_path)s.png">http://otile1.mqcdn.com/tiles/1.0.0/osm/%(tms_path)s.png</a><br>
    grid: global_mercator_osm   <br>    on_error:<br>        202:<br>          response: transparent<br>          cache: True    <br>globals:<br>  # # coordinate transformation options<br>  srs:<br>  #   # WMS 1.3.0 requires all coordiates in the correct axis order,<br>
  #   # i.e. lon/lat or lat/lon. Use the following settings to<br>  #   # explicitly set a CRS to either North/East or East/North<br>  #   # ordering.<br>  #   axis_order_ne: ['EPSG:9999', 'EPSG:9998']<br>
  #   axis_order_en: ['EPSG:0000', 'EPSG:0001']<br>  #   # you can set the proj4 data dir here, if you need custom<br>  #   # epsg definitions. the path must contain a file named 'epsg'<br>  #   # the format of the file is:<br>
  #   # <4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  <><br>     proj_data_dir: '/usr/share/proj/'<br><br>  # image/transformation options<br>  image:<br>      #resampling_method: nearest<br>
      # resampling_method: bilinear<br>       resampling_method: bicubic<br>       paletted: false<br>  #     jpeg_quality: 90<br>  #     # stretch cached images by this factor before<br>  #     # using the next level<br>
  #     stretch_factor: 1.15<br>  #     # shrink cached images up to this factor before<br>  #     # returning an empty image (for the first level)<br>  #     max_shrink_factor: 4.0<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>and the test request:<br><a href="http://mapproxy:8080/service?VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:2169&BBOX=-5492.29987506387,969.790037458326,168537.735685007,192859.236316351&WIDTH=877&HEIGHT=967&LAYERS=OSM_MQ&STYLES=&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE">http://mapproxy:8080/service?VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:2169&BBOX=-5492.29987506387,969.790037458326,168537.735685007,192859.236316351&WIDTH=877&HEIGHT=967&LAYERS=OSM_MQ&STYLES=&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE</a><br>
<br><br>Thanks in advance<br>Jeff<br><br><div class="gmail_quote">On Fri, Jun 29, 2012 at 11:42 AM, Jeff Konnen <span dir="ltr"><<a href="mailto:jaykayone@gmail.com" target="_blank">jaykayone@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is weird, if I try to open the file in python, it seems to be ok:<br><br>import urllib2<br>import Image<br>from cStringIO import StringIO<br>

im = Image.open(StringIO(urllib2.urlopen("<a href="http://otile2.mqcdn.com/tiles/1.0.0/osm/9/264/174.png" target="_blank">http://otile2.mqcdn.com/tiles/1.0.0/osm/9/264/174.png</a>").read()))<br>
print im.format, im.size, im.mode<br><br>but when using mapproxy I still get this message: <br><br>[2012-06-29 11:24:26,823] mapproxy.image.tile - WARNING - unable to load tile <mapproxy.image.ImageSource object at 0x7fc9f0034ad0>, removing it (reason was: decoding error when reading image file)<br>


<br>fyi, this is my source:<br>  osm_tms_mq:<br>    type: tile<br>    url: <a href="http://otile1.mqcdn.com/tiles/1.0.0/osm/%%28tms_path%29s.png" target="_blank">http://otile1.mqcdn.com/tiles/1.0.0/osm/%(tms_path)s.png</a><br>

    grid: global_mercator_osm<br>
    on_error:<br>        202:<br>          response: transparent<br>          cache: True<br><br>and my wms definition:<br> wms:<br>    srs: ['EPSG:2169','EPSG:310024802']<br>    image_formats: ['image/jpeg','image/png']<br>


<br>my test-request: <a href="http://mapproxy:8080/service?VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:2169&BBOX=-5492.29987506387,969.790037458326,168537.735685007,192859.236316351&WIDTH=877&HEIGHT=967&LAYERS=OSM_MQ&STYLES=&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE" target="_blank">http://mapproxy:8080/service?VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:2169&BBOX=-5492.29987506387,969.790037458326,168537.735685007,192859.236316351&WIDTH=877&HEIGHT=967&LAYERS=OSM_MQ&STYLES=&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE</a><br>


<br>I've been using this WMS for a while now and it seems to be only that one tile<br>Any idea?<br>Jeff<div><div><br><br><br><div class="gmail_quote">On Wed, Jun 27, 2012 at 11:56 AM, Jeff Konnen <span dir="ltr"><<a href="mailto:jaykayone@gmail.com" target="_blank">jaykayone@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div>On Wed, Jun 27, 2012 at 11:50 AM, Oliver Tonnhofer <span dir="ltr"><<a href="mailto:olt@omniscale.de" target="_blank">olt@omniscale.de</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
On 27.06.2012, at 11:36, Jeff Konnen wrote:<br>
> I've found this error in my logs: [2012-06-27 11:33:57,623] mapproxy.image.tile - WARNING - unable to load tile <mapproxy.image.ImageSource object at 0x7f52bc03e350>, removing it (reason was: decoding error when reading image file)<br>




><br>
> It's about this tile: <a href="http://otile2.mqcdn.com/tiles/1.0.0/osm/9/264/174.png" target="_blank">http://otile2.mqcdn.com/tiles/1.0.0/osm/9/264/174.png</a><br>
<br>
</div>Are you sure that this is the right file? MapProxy removes the tile when you see this warning and will re-request it from the source.<br>
<div><br>
> Does anyone have an idea about what this could be about?<br>
<br>
</div>MapProxy/PIL could somehow not read the tile.<br>
<br>
BTW: The tile is a JPEG and not a PNG.<br>
<br></blockquote></div><div><br>That's correct, but the neighbouring tiles are all JPEGs called PNG too and PIL can read them, it's weird..<br> </div><div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




Regards,<br>
Oliver<br>
<span><font color="#888888"><br>
--<br>
Oliver Tonnhofer    | Omniscale GmbH & Co KG    | <a href="http://omniscale.de" target="_blank">http://omniscale.de</a><br>
<a href="http://mapproxy.org" target="_blank">http://mapproxy.org</a> | <a href="https://bitbucket.org/olt" target="_blank">https://bitbucket.org/olt</a> | @oltonn<br>
<br>
<br>
<br>
<br>
</font></span></blockquote></div></div><span><font color="#888888"><br><br clear="all"><br>-- <br>Jeff Konnen<br><br>
</font></span></blockquote></div><br><br clear="all"><br></div></div><span><font color="#888888">-- <br>Jeff Konnen<br><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Jeff Konnen<br><br>