astropy.io.ascii.Cds format exception (ValueError for invalid NULL)
See original GitHub issueEDIT: Solution provided at https://github.com/astropy/astropy/issues/11239#issuecomment-758778951
Description
The CDS format (astropy.io.ascii.Cds) throws exceptions for some VizieR tables.
The exception appears for ascii tables having ‘-’ as null values.
Expected behavior
Take into account the ‘-’ as null values in the read method.
Actual behavior
Throw an Exception
Steps to Reproduce
# Put your Python code snippet here.
from astropy.io import ascii
readme = "ftp://cdsarc.u-strasbg.fr/pub/cats/J/A+A/642/A176/ReadMe"
r = ascii.get_reader(ascii.Cds, readme=readme)
table = r.read("ftp://cdsarc.u-strasbg.fr/pub/cats/J/A+A/642/A176/table5.dat")
System Details
Issue Analytics
- State:
- Created 3 years ago
- Comments:28 (21 by maintainers)
Top Results From Across the Web
ASCII Tables (astropy.io.ascii) — Astropy v5.2
astropy.io.ascii provides methods for reading and writing a wide range of ASCII data table formats via built-in Extension Reader Classes.
Read more >Full Changelog — Astropy v3.2.dev994
[#5578]; Units in CDS-formatted tables are now parsed correctly by the units ... Fix a unicode decode error when reading a table with...
Read more >astropy.io.fits History
Prior to its inclusion in Astropy, the astropy.io.fits package was a ... the case of malformatted FITS files that contain non-float NULL values...
Read more >asciitable 0.8.0 documentation
The astropy.io.ascii package is being actively developed and contains many new features and bug ... fixed format table, or a CDS-compatible table, etc....
Read more >python-astropy-4.0.2-bp153.1.10 - SUSE Package Hub
[gh#astropy/astropy#9812] Fixed exception when changing ``format`` in the case when ... astropy.io.ascii * Removed incorrect warnings on ``Overflow`` when ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s sounds good -
In CDS side we will clarify NULL decimal values- when NULL decimal values are not specified with ‘?=…’ , only blank are accepted. Else decimal NULL values will be declared (example: ?=999 for 999 NULL values or ?=- to use the pattern --* as NULL)
I’m going to close this issue as per my previous message, but if you feel that this issue should stay open, then feel free to re-open and remove the Close? label.
If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here