Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Arcgisimage fails #242

Copy link
Copy link
Closed
Closed
Copy link
@bjacotg

Description

@bjacotg
Issue body actions

I tried a simple map and add some arcgisimage, but it failed.

Here is the code:

m=Basemap(projection='cyl',llcrnrlon=-90,llcrnrlat=30,urcrnrlon=-60,urcrnrlat=60)
m.arcgisimage(verbose=True)
plt.show()

And the error:

Traceback (most recent call last):
  File "/home/bastien/PycharmProjects/untitled/rider_analysis.py", line 55, in <module>
    m.arcgisimage(verbose=True)
  File "/usr/lib/python3.5/site-packages/mpl_toolkits/basemap/__init__.py", line 4270, in arcgisimage
    return self.imshow(imread(urllib.request.urlopen(basemap_url)),origin='upper')
  File "/usr/lib/python3.5/site-packages/matplotlib/image.py", line 1326, in imread
    return handler(fname)
SystemError: <built-in function read_png> returned NULL without setting an error

Process finished with exit code 1

After debugging around, I found that imread does not like http.request.HttpResponse, but works fine with file path.

Regards,

Bastien

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.