[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #VIA-519296]: Issue with color tables



Greetings!

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 
re-install metpy?

    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.

Ryan

> 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
> Notebook:
> 
> 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
> 3
> 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 
> <module>
> 17 logger = logging.getLogger(__name__)
> 18 ---> 19 __all__ = ctables.__all__[:]  # pylint:
> disable=undefined-variable
> 20 __all__.extend(declarative.__all__)  # pylint:
> disable=undefined-variable
> 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 Details
===================
Ticket ID: VIA-519296
Department: Support Python
Priority: Low
Status: Closed
===================
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.