astrofrog / wcsaxes

wcsaxes has been merged into astropy!
http://docs.astropy.org/en/stable/visualization/wcsaxes/index.html
22 stars 21 forks source link

When trying to create an overlay from a non-existent frame a crazy error is raised. #154

Closed Cadair closed 9 years ago

Cadair commented 9 years ago
/home/stuart/GitHub/sunpy/sunpy/visualization/wcsaxes_compat.py in wcsaxes_heliographic_overlay(axes)
     82     """
     83     Draw a heliographic overlay using wcsaxes
     84     """
---> 85     overlay = axes.get_coords_overlay('heliographicstonyhurst')
     86 
     87     lon = overlay[0]

/opt/miniconda/envs/sunpy-dev/lib/python2.7/site-packages/wcsaxes/core.pyc in get_coords_overlay(self, frame, equinox, obstime, coord_meta)
    186         else:
    187             if coord_meta is None:
--> 188                 coord_meta = get_coord_meta(frame)
    189             transform = self._get_transform_no_transdata(frame, equinox=equinox, obstime=obstime)
    190             coords = CoordinatesMap(self, transform=transform, coord_meta=coord_meta, frame_class=self.frame_class)

/opt/miniconda/envs/sunpy-dev/lib/python2.7/site-packages/wcsaxes/utils.pyc in get_coord_meta(frame)
    108             frame = frame_transform_graph.lookup_name(frame)
    109 
--> 110         names = list(frame().representation_component_names.keys())
    111         coord_meta['name'] = names[:2]
    112 

TypeError: 'NoneType' object is not callable

This should probably exit more gracefully than this.

astrofrog commented 9 years ago

Hmm, yeah.

astrofrog commented 9 years ago

@Cadair - fix attached

Cadair commented 9 years ago

Cool!