basemap icon indicating copy to clipboard operation
basemap copied to clipboard

MPL2.1 deprecation warning for axesPatch

Open naught101 opened this issue 8 years ago • 19 comments

/home/naught101/miniconda3/envs/science/lib/python3.6/site-packages/mpl_toolkits/basemap/__init__.py:1708: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead.
  limb = ax.axesPatch
/home/naught101/miniconda3/envs/science/lib/python3.6/site-packages/mpl_toolkits/basemap/__init__.py:1711: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead.
  if limb is not ax.axesPatch:

naught101 avatar Nov 20 '17 01:11 naught101

Seeing this same issue - anyone have advice on a solution?

EDIT: temporarily workaround is to lock matplotlib at 2.0.2 via

pip install matplotlib==2.0.2

piercefreeman avatar Dec 04 '17 20:12 piercefreeman

Seeing this same issue - anyone have advice on a solution?

It's already fixed in master, see #373, so this is only about when a point release will be done.

megies avatar Mar 21 '18 10:03 megies

N.b. this will break basemap 1.1.0 with matplotlib 2.3 so a basemap point release is needed rather sooner than later, see https://github.com/matplotlib/matplotlib/commit/1279b841d52da5d93124b53f41274aced086f09c#diff-a7f4f21aa80e975d813bc436acb68d8cL1140.

megies avatar Mar 21 '18 10:03 megies

still not fixed? I tried everyone's advice and then some but the warning breaks my whole system!!

IndianaTones avatar Apr 24 '18 15:04 IndianaTones

Install basemap from conda-forge channel.

On Tue, Apr 24, 2018 at 11:07 AM, IndianaTones [email protected] wrote:

still not fixed? I tried everyone's advice and then some but the warning breaks my whole system!!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/382#issuecomment-383967742, or mute the thread https://github.com/notifications/unsubscribe-auth/AARy-Ak6ziFDD9TyrX0zdtwZUHJFPgOTks5trz-ogaJpZM4QjpTd .

WeatherGod avatar Apr 24 '18 15:04 WeatherGod

@WeatherGod - I did - condo install -c condo-forge basemap - but problem persists

IndianaTones avatar Apr 24 '18 17:04 IndianaTones

Can you confirm that you are importing the correct version (v1.1.0)? You might need to do a conda update -c conda-forge basemap

On Tue, Apr 24, 2018 at 1:00 PM, IndianaTones [email protected] wrote:

@WeatherGod https://github.com/WeatherGod - I did - condo install -c condo-forge basemap - but problem persists

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/382#issuecomment-384006207, or mute the thread https://github.com/notifications/unsubscribe-auth/AARy-FDRpE9uEKvnRH5q0ea0OuY0-fVaks5tr1o7gaJpZM4QjpTd .

WeatherGod avatar Apr 24 '18 18:04 WeatherGod

/Users/ah104/anaconda3/lib/python3.6/site-packages/mpl_toolkits/basemap/init.py:1708: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead. limb = ax.axesPatch /Users/ah104/anaconda3/lib/python3.6/site-packages/mpl_toolkits/basemap/init.py:1711: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead. if limb is not ax.axesPatch: :(

IndianaTones avatar Apr 24 '18 18:04 IndianaTones

>>> from mpl_toolkits import basemap
>>> basemap.__version__
'1.1.0'

What does it say for you?

On Tue, Apr 24, 2018 at 2:54 PM, IndianaTones [email protected] wrote:

/Users/ah104/anaconda3/lib/python3.6/site-packages/mpl_toolkits/basemap/ init.py:1708: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead. limb = ax.axesPatch /Users/ah104/anaconda3/lib/python3.6/site-packages/mpl_toolkits/basemap/ init.py:1711: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead. if limb is not ax.axesPatch: :(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/382#issuecomment-384041660, or mute the thread https://github.com/notifications/unsubscribe-auth/AARy-AW96NghnNUjOrdEsbXxRwfVofikks5tr3TKgaJpZM4QjpTd .

WeatherGod avatar Apr 24 '18 19:04 WeatherGod

>>> from mpl_toolkits import basemap
>>> basemap.__version__
'1.1.0'

same! what am I doing wrong?

IndianaTones avatar Apr 24 '18 19:04 IndianaTones

@WeatherGod the fix for this issue is in master but not in 1.1.0. To fix this issue a new release is needed (as mentioned above https://github.com/matplotlib/basemap/issues/382#issuecomment-374888654). This will break when matplotlib 2.3.0 comes out, not sure when this will be but we're already at 2.2.2.

[...] the warning breaks my whole system!!

I'm not sure what you mean with that, it's still only a warning in matplotlib 2.2.2, unless you've installed matplotlib from their master branch the only problem is the warning text cluttering your screen.

megies avatar Apr 25 '18 12:04 megies

@megies @WeatherGod thank you for the help - clearly I am a newbie! It's true, only warnings appear without errors but along with the warnings my entire system freezes and locks up with a re-start required.

IndianaTones avatar Apr 25 '18 13:04 IndianaTones

along with the warnings my entire system freezes and locks up with a re-start required

Alright, but certainly that freeze is not related to this issue.

megies avatar Apr 25 '18 13:04 megies

well, it is this issue that triggers the warnings which is then followed by freezing, so somehow it is related.

IndianaTones avatar Apr 25 '18 15:04 IndianaTones

well, it is this issue that triggers the warnings which is then followed by freezing, so somehow it is related.

It isn't, believe me. If you want to find out the problem, you should hop through your code line by line using a debugger. https://pymotw.com/3/pdb/index.html

But this is going way off-topic, here.

megies avatar Apr 25 '18 15:04 megies

It locks up my whole system too...

bplant17 avatar Jun 10 '18 21:06 bplant17

Can confirm that this warning still appears with the latest release (v1.1.0, installed today, from source, following the documentation).

...lib/python3.5/site-packages/mpl_toolkits/basemap/__init__.py:1707: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead.
  if limb is not ax.axesPatch:

Linux-cpp-lisp avatar Sep 06 '18 19:09 Linux-cpp-lisp

yes, the fix was not in v1.1.0, but it is in master.

On Thu, Sep 6, 2018 at 3:50 PM Alby M. [email protected] wrote:

Can confirm that this warning still appears with the latest release ( v1.1.0 https://github.com/matplotlib/basemap/releases/tag/v1.1.0, installed today, from source, following the documentation https://matplotlib.org/basemap/users/installing.html).

...lib/python3.5/site-packages/mpl_toolkits/basemap/init.py:1707: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead. if limb is not ax.axesPatch:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/382#issuecomment-419219567, or mute the thread https://github.com/notifications/unsubscribe-auth/AARy-DzMnzfkTZx9WsleAqKIQWCO1bJ_ks5uYXyMgaJpZM4QjpTd .

WeatherGod avatar Sep 06 '18 20:09 WeatherGod

It locks up my whole system too...

I've said it before, a deprecation warning is not gonna freeze your system. You need to use a debugger to find out what command actually does not finish.

megies avatar Sep 07 '18 08:09 megies