Skip to content

Fix sky coord init nodata - #2620

Merged
taldcroft merged 2 commits into
astropy:masterfrom
eteq:fix-sky-coord-init-nodata
Jun 15, 2014
Merged

taldcroft merged 2 commits into
astropy:masterfrom
eteq:fix-sky-coord-init-nodata

Conversation

@eteq

@eteq eteq commented Jun 12, 2014

Copy link
Copy Markdown
Member

DO NOT MERGE UNTIL #2586 IS IN

This closes #2613 by simply adding a check to make sure a SkyCoord has data after all the initialization steps are done.

It also fixes some quirks I noticed in how exceptions are handled for the case where a frame has no data. The basic problem was that the data property was raising an AttributeError that wouldn't be recognized in __getattr__. This sidesteps it by changing the relevant exception to a ValueError so that the user will again see a more helpful message that the frame has no data.

This is built from #2586 because otherwise there'd be conflicting changes. So once #2586 is in, I'll rebase and this can be merged. But in the meantime, just look at the last two commits to see what this actually does.

cc @taldcroft @cdeil

@eteq eteq added this to the v0.4.0 milestone Jun 12, 2014
@eteq

eteq commented Jun 15, 2014

Copy link
Copy Markdown
Member Author

This is now rebased and should be ready to go now that #2586 is merged - @taldcroft you might want to just take a quick glance to make sure it looks fine to you.

@taldcroft

Copy link
Copy Markdown
Member

👍

taldcroft added a commit that referenced this pull request Jun 15, 2014
@taldcroft
taldcroft merged commit af166ba into astropy:master Jun 15, 2014
@eteq
eteq deleted the fix-sky-coord-init-nodata branch June 15, 2014 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Affects-dev PRs and issues that do not impact an existing Astropy release Bug coordinates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ValueError in repr for default SkyCoord

2 participants