[MapProxy] Decoding Error
jaykayone at gmail.com
Tue Jul 3 03:24:08 PDT 2012
It is neither python26 vs python27, nor rhel vs debian vs windows...
i just found the potential error source: our proxy ..
I installed the entire solution on a windows machine that is using another
proxy for outgoing connections. Works well.
I took that same machine and put it into our dmz using a squid - proxy ..
-> problem is there ...
so all in all I installed mapproxy on 4 different OSes (and it worked like
a charm on all of them) to find out that the problem is the proxy ..
Thanks for listening and telling me that it works for you, that pointed me
into the right direction.
Now I "only" have to find out what squid is doing wrong ..
On Mon, Jul 2, 2012 at 10:41 PM, Jeff Konnen <jaykayone at gmail.com> wrote:
> Hi Oliver
> Could it be python 2.6?
> On RHEL, we use python 2.6, on mac os, i tested with python 2.7
> Otherwise versions of mapproxy and PIL seem to identical
> Thanks for your help
> On 02 Jul 2012, at 16:15, Jeff Konnen wrote:
> Upgrading Mapproxy and PIL to 1.4.0 resp 1.1.7 did not help either :(
> Some more information: After upgrading, the error message is a bit more
> unable to load tile <mapproxy.image.ImageSource object at 0x7fac30036750>,
> removing it (reason was: broken data stream when reading image file)
> 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.
> Here is my test yaml:
> # needs no arguments
> srs: ['EPSG:2169']
> image_formats: ['image/jpeg','image/png']
> # metadata used in capabilities documents
> title: MapProxy WMS Proxy
> abstract: This is the fantastic MapProxy.
> online_resource: http://mapproxy.org/
> person: Your Name Here
> position: Technical Director
> address: Fakestreet 123
> city: Somewhere
> postcode: 12345
> country: Germany
> phone: +49(0)000-000000-0
> fax: +49(0)000-000000-0
> email: info at omniscale.de
> This service is intended for private and evaluation use only.
> The data is licensed as Creative Commons Attribution-Share Alike
> fees: 'None'
> - name: OSM_MQ
> title: OSM_MQ
> sources: [osm_cache_mq]
> base: GLOBAL_MERCATOR
> num_levels: 18
> origin: nw
> srs: EPSG:900913
> grids: [global_mercator_osm]
> sources: [osm_tms_mq]
> disable_storage: true
> format: image/png
> type: mbtiles
> filename: /tmp/osm_mq.mbtiles
> type: tile
> url: http://otile1.mqcdn.com/tiles/1.0.0/osm/%(tms_path)s.png
> grid: global_mercator_osm
> response: transparent
> cache: True
> # # coordinate transformation options
> # # WMS 1.3.0 requires all coordiates in the correct axis order,
> # # i.e. lon/lat or lat/lon. Use the following settings to
> # # explicitly set a CRS to either North/East or East/North
> # # ordering.
> # axis_order_ne: ['EPSG:9999', 'EPSG:9998']
> # axis_order_en: ['EPSG:0000', 'EPSG:0001']
> # # you can set the proj4 data dir here, if you need custom
> # # epsg definitions. the path must contain a file named 'epsg'
> # # the format of the file is:
> # # <4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs <>
> proj_data_dir: '/usr/share/proj/'
> # image/transformation options
> #resampling_method: nearest
> # resampling_method: bilinear
> resampling_method: bicubic
> paletted: false
> # jpeg_quality: 90
> # # stretch cached images by this factor before
> # # using the next level
> # stretch_factor: 1.15
> # # shrink cached images up to this factor before
> # # returning an empty image (for the first level)
> # max_shrink_factor: 4.0
> and the test request:
> Thanks in advance
> On Fri, Jun 29, 2012 at 11:42 AM, Jeff Konnen <jaykayone at gmail.com> wrote:
>> This is weird, if I try to open the file in python, it seems to be ok:
>> import urllib2
>> import Image
>> from cStringIO import StringIO
>> im = Image.open(StringIO(urllib2.urlopen("
>> print im.format, im.size, im.mode
>> but when using mapproxy I still get this message:
>> [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)
>> fyi, this is my source:
>> type: tile
>> url: http://otile1.mqcdn.com/tiles/1.0.0/osm/%(tms_path)s.png
>> grid: global_mercator_osm
>> response: transparent
>> cache: True
>> and my wms definition:
>> srs: ['EPSG:2169','EPSG:310024802']
>> image_formats: ['image/jpeg','image/png']
>> my test-request:
>> I've been using this WMS for a while now and it seems to be only that one
>> Any idea?
>> On Wed, Jun 27, 2012 at 11:56 AM, Jeff Konnen <jaykayone at gmail.com>wrote:
>>> On Wed, Jun 27, 2012 at 11:50 AM, Oliver Tonnhofer <olt at omniscale.de>wrote:
>>>> On 27.06.2012, at 11:36, Jeff Konnen wrote:
>>>> > 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)
>>>> > It's about this tile:
>>>> 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.
>>>> > Does anyone have an idea about what this could be about?
>>>> MapProxy/PIL could somehow not read the tile.
>>>> BTW: The tile is a JPEG and not a PNG.
>>> That's correct, but the neighbouring tiles are all JPEGs called PNG too
>>> and PIL can read them, it's weird..
>>>> Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.de
>>>> http://mapproxy.org | https://bitbucket.org/olt | @oltonn
>>> Jeff Konnen
>> Jeff Konnen
> Jeff Konnen
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the MapProxy