New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVO votable fails to parse, but looks valid? #10572
Comments
Did you try run |
No, that would have been too clever. It reports the same error. Is there any way to work around this error, then? noncompliant votables are more common than compliant...
|
I think this is a question of either XML or VOTABLE standards and I have to defer to @tomdonaldson . As far as I can understand the IVOA standards on OPTION and setting null value, you cannot just set empty string like that. The parser does not recognize it and reports that "option has no value" because the value is empty; i.e., the iterator only sees If I change the data to the following, it works: <VALUES null="999">
<OPTION value="999" name="All"/> Is this a bug or feature, I don't know. But regardless, you might want to tell the service provider so they can work on fixing their VO tables. |
Relevant code: astropy/astropy/io/votable/tree.py Lines 1033 to 1035 in e0f4de3
|
Reported to the SVO. Thanks @pllim! Let's see if they fix it. |
Ugh. The distinction between a null valued string and an intentionally empty string has a been a low-level persistent ambiguity in VOTables. (Also, this example is VOTable version 1.1, which is not directly relevant, but predates some of the clarity that came about later for null values, mostly for non-strings.) For this case, I think the On a whim I compared the default behavior of the "fast" parser with that with of the "slow" parser as below:
The code above is happy with the astropy/astropy/io/votable/tree.py Lines 1033 to 1035 in e0f4de3
@keflavich If the slow parser doesn't have important known differences (@pllim?), the |
Ironically, the parser doesn't complain at all that the |
Hi all My name is Carlos and I'm the developer of this SVO service . Thanks for making us aware of this problem. Actually I don't see any important reason to keep this empty VALUE in this VOTable, so I have just deleted it. The idea was saying that if you leave "Instrument" empty in a query all "instrument" values will be included. But I don't think that it is necessary. But I would prefer to get more opinions about this (maybe try to discuss this at the IVOA level), because I don't think that there is a reason why having a value="" for an OPTION in a string PARAM should be incorrect and it would be good to clarify this as much as possible. The old version of the service can be seen (by now, just in case further discussion is needed) at |
Re: #10572 (comment) Theoretically, the behavior with or without |
The |
The naming of |
Since the service referenced in the original report has changed to prevent this problem, here is a self-contained code block that demonstrates the issue on a tiny, but mostly legal VOTable. Note that the
|
This VOTABLE:
http://svo2.cab.inta-csic.es/theory/fps/fps.php?FORMAT=metadata
will not load because of the following error:
The line it's failing on is
<OPTION name="All" value=""/>
, which has a value specified, it's just empty.Is this an invalid table, or is this a real bug in the reader?
The text was updated successfully, but these errors were encountered: