Skip to content

Corrects the following error: #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2016
Merged

Conversation

pick2510
Copy link
Contributor

@pick2510 pick2510 commented Feb 9, 2016

.7/site-packages/mpl_toolkits/basemap/init.py", line 4358, in wmsimage
return self.imshow(imread(io.BytesIO(urllib2.urlopen(img.url).read()),
AttributeError: 'ResponseWrapper' object has no attribute 'url'

It might have something to do with an owslib update

.7/site-packages/mpl_toolkits/basemap/__init__.py", line 4358, in wmsimage
    return self.imshow(imread(io.BytesIO(urllib2.urlopen(img.url).read()),
AttributeError: 'ResponseWrapper' object has no attribute 'url'

It might have something to do with an owslib update
@WeatherGod
Copy link
Member

Any idea how many versions owslib has supported this particular syntax?

@pick2510
Copy link
Contributor Author

pick2510 commented Feb 9, 2016

Unfortunately not. I just tried to display a wms image with an all updated anaconda installation and debugged the wmsimage function. I didn’t build the package by hand to control the behaviour. But it solved my problem.
I can give you more details how I called the function if that's useful for you

@WeatherGod
Copy link
Member

Ok, I did some digging into the history of owslib. The usage of calling ".read()" on the returned object dates back to at least 2009. I'd say that is sufficient backwards compatibility.

WeatherGod added a commit that referenced this pull request Feb 24, 2016
Corrects the following error:
@WeatherGod WeatherGod merged commit 8872dbc into matplotlib:master Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants