RadioAstronomySoftwareGroup / pyradiosky

Python objects and interfaces for representing diffuse, extended and compact astrophysical radio sources
https://pyradiosky.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
14 stars 5 forks source link

Better error messages when not passing required arguments for specific filetypes to generic `read` method #200

Open bhazelton opened 1 year ago

bhazelton commented 1 year ago

This is a particular problem for votable files, where a number of column names must be specified. If you call the read_votable_file method, they are positional, required inputs. But when you call the generic read function they are defaulted to None and then you get a fairly unhelpful error message because it's trying to do work on a None object. These Nones should be caught in either the generic read method or the read_votable_file method (probably the latter).