{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/basemap/issues/242","labels_url":"https://api.github.com/repos/matplotlib/basemap/issues/242/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/basemap/issues/242/comments","events_url":"https://api.github.com/repos/matplotlib/basemap/issues/242/events","html_url":"https://github.com/matplotlib/basemap/issues/242","id":122096932,"number":242,"title":"Arcgisimage fails","user":{"login":"M-Jack","id":2683744,"avatar_url":"https://avatars.githubusercontent.com/u/2683744?v=3","gravatar_id":"","url":"https://api.github.com/users/M-Jack","html_url":"https://github.com/M-Jack","followers_url":"https://api.github.com/users/M-Jack/followers","following_url":"https://api.github.com/users/M-Jack/following{/other_user}","gists_url":"https://api.github.com/users/M-Jack/gists{/gist_id}","starred_url":"https://api.github.com/users/M-Jack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/M-Jack/subscriptions","organizations_url":"https://api.github.com/users/M-Jack/orgs","repos_url":"https://api.github.com/users/M-Jack/repos","events_url":"https://api.github.com/users/M-Jack/events{/privacy}","received_events_url":"https://api.github.com/users/M-Jack/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-14T18:02:30Z","updated_at":"2015-12-14T18:36:49Z","closed_at":null,"body":"I tried a simple map and add some `arcgisimage`, but it failed.\r\n\r\n\r\nHere is the code:\r\n```\r\nm=Basemap(projection='cyl',llcrnrlon=-90,llcrnrlat=30,urcrnrlon=-60,urcrnrlat=60)\r\nm.arcgisimage(verbose=True)\r\nplt.show()\r\n```\r\n\r\n\r\nAnd the error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/bastien/PycharmProjects/untitled/rider_analysis.py\", line 55, in <module>\r\n    m.arcgisimage(verbose=True)\r\n  File \"/usr/lib/python3.5/site-packages/mpl_toolkits/basemap/__init__.py\", line 4270, in arcgisimage\r\n    return self.imshow(imread(urllib.request.urlopen(basemap_url)),origin='upper')\r\n  File \"/usr/lib/python3.5/site-packages/matplotlib/image.py\", line 1326, in imread\r\n    return handler(fname)\r\nSystemError: <built-in function read_png> returned NULL without setting an error\r\n\r\nProcess finished with exit code 1\r\n```\r\n\r\nAfter debugging around, I found that `imread` does not like `http.request.HttpResponse`, but works fine with file path.\r\n\r\nRegards,\r\n\r\nBastien"},"comment":{"url":"https://api.github.com/repos/matplotlib/basemap/issues/comments/164520438","html_url":"https://github.com/matplotlib/basemap/issues/242#issuecomment-164520438","issue_url":"https://api.github.com/repos/matplotlib/basemap/issues/242","id":164520438,"user":{"login":"M-Jack","id":2683744,"avatar_url":"https://avatars.githubusercontent.com/u/2683744?v=3","gravatar_id":"","url":"https://api.github.com/users/M-Jack","html_url":"https://github.com/M-Jack","followers_url":"https://api.github.com/users/M-Jack/followers","following_url":"https://api.github.com/users/M-Jack/following{/other_user}","gists_url":"https://api.github.com/users/M-Jack/gists{/gist_id}","starred_url":"https://api.github.com/users/M-Jack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/M-Jack/subscriptions","organizations_url":"https://api.github.com/users/M-Jack/orgs","repos_url":"https://api.github.com/users/M-Jack/repos","events_url":"https://api.github.com/users/M-Jack/events{/privacy}","received_events_url":"https://api.github.com/users/M-Jack/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T18:36:49Z","updated_at":"2015-12-14T18:36:49Z","body":"testarcgist.py fails with the same error it seems.\r\n\r\n```\r\nhttp://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export?bbox=-90.0,29.999999999999996,-59.99999999999999,59.99999999999999&bboxSR=4326&imageSR=4326&size=400,400&dpi=96&format=png32&f=image\r\nTraceback (most recent call last):\r\n  File \"test.py\", line 11, in <module>\r\n    m.arcgisimage(verbose=True)\r\n  File \"/usr/lib/python3.5/site-packages/mpl_toolkits/basemap/__init__.py\", line 4270, in arcgisimage\r\n    return self.imshow(imread(urllib.request.urlopen(basemap_url)),origin='upper')\r\n  File \"/usr/lib/python3.5/site-packages/matplotlib/image.py\", line 1326, in imread\r\n    return handler(fname)\r\nSystemError: <built-in function read_png> returned NULL without setting an error\r\n                                                                                                                                                                                                                    ```"}}