[python #VIA-519296]: Issue with color tables
- Subject: [python #VIA-519296]: Issue with color tables
- Date: Mon, 25 May 2020 19:37:45 -0600
That's alarming. Can you send me the output of `conda list -n unidata`? I want
to confirm that CartoPy rolled back properly.
Also, I have one idea that a stale file may be sitting around. Can you try
conda remove -n unidata metpy
conda install -c conda-forge -n unidata metpy
With any luck that may resolve it. If not, we can keep digging.
> Let me start off by saying that I am new to coding, Python, and Metpy. I
> was following the MetPy Monday tutorial '#30 - Basic Radar Plotting Part 2'
> when I was having trouble with some imports. I wrote this code in a Jupyter
> from metpy.plots import ctables
> fig = plt.figure(figsize=(10, 10))
> ax = plt.subplot(1, 1, 1, projection=proj)
> norm, cmap = colortables.registry.get_with_steps('NWSReflectivity', 16, 16)
> mesh = ax.pcolormesh(x, y, radar_data, zorder=0)
> I got this error message:
> NameError Traceback (most recent call
> last)<ipython-input-7-1f606733b707> in <module>
> 1 # from metpy.plots.ctables import colortables----> 2 from
> metpy.plots import ctables
> 4 fig = plt.figure(figsize=(10, 10))
> 5 ax = plt.subplot(1, 1, 1, projection=proj)
> ~\miniconda3\envs\unidata\lib\site-packages\metpy\plots\__init__.py in
> 17 logger = logging.getLogger(__name__)
> 18 ---> 19 __all__ = ctables.__all__[:] # pylint:
> 20 __all__.extend(declarative.__all__) # pylint:
> 21 __all__.extend(skewt.__all__) # pylint: disable=undefined-variable
> NameError: name 'ctables' is not defined
> I thought the problem was that thefrom empty.plots import ctables command
> was changed or updated, so I looked in the docs and can't figure this one
> out. I posted about this on Stack Overflow and was directed to a post
> saying to rollback to Cartopy 0.17, but this did not fix it. What would you
> recommend doing?
Ticket ID: VIA-519296
Department: Support Python
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata
inquiry tracking system and then made publicly available through the web. If
you do not want to have your interactions made available in this way, you must
let us know in each email you send to us.