Skip to content

"No table found in VOTABLE file" for Simbad MAIN_ID #1232

Closed

Description

@Roman-UCLU

I spent quite a while trying to figure this out; all in vain. Below is the code of the simplest possible Simbad query:

from astroquery.simbad import Simbad
result_table = Simbad.query_object("QSO B0003-066")
print(result_table)

Here "QSO B0003-066" is, actually, the main Simbad ID of the object (online). The result is the error in the issue title.

Surprisingly, when querying any of the alternative IDs (e.g. "AT20G J000613-062334"), the query works just fine.

Is there something obvious I'm missing?

Thanks!

Activity

  1. bsipocz commented on Sep 12, 2018

    @bsipocz
    Member

    What version of astroquery do you use? It works for me as expected:

    In [88]: from astroquery.simbad import Simbad
        ...: result_table = Simbad.query_object("QSO B0003-066")
        ...: print(result_table)
        ...: 
        ...: 
       MAIN_ID          RA      ... COO_WAVELENGTH     COO_BIBCODE    
                     "h:m:s"    ...                                   
    ------------- ------------- ... -------------- -------------------
    QSO B0003-066 00 06 13.8928 ...              R 2009A&A...493..317L
    
  2. Roman-UCLU commented on Sep 12, 2018

    @Roman-UCLU
    Author

    Thanks, Brigitta!

    My version is 0.3.7...

    This is really strange. Any possible reason why it may not be working for me? Here's the full output:

    C:\Program Files\Python\lib\site-packages\astroquery\simbad\core.py:136: UserWarning: Warning: The script line number 2 raised an error (recorded in the `errors` attribute of the result table): java.lang.NullPointerException
      (error.line, error.msg))
    ---------------------------------------------------------------------------
    TableParseError                           Traceback (most recent call last)
    <ipython-input-1-bfc36190b472> in <module>()
          1 from astroquery.simbad import Simbad
    ----> 2 result_table = Simbad.query_object("QSO B0003-066")
          3 print(result_table)
    
    C:\Program Files\Python\lib\site-packages\astroquery\simbad\core.pyc in query_object(self, object_name, wildcard, verbose, get_query_payload)
        507 
        508         return self._parse_result(response, SimbadVOTableResult,
    --> 509                                   verbose=verbose)
        510 
        511     def query_object_async(self, object_name, wildcard=False, cache=True,
    
    C:\Program Files\Python\lib\site-packages\astroquery\simbad\core.pyc in _parse_result(self, result, resultclass, verbose)
       1017                                   " parsed result is in "
       1018                                   "self.last_parsed_result.\n "
    -> 1019                                   "Exception: " + str(ex))
       1020         resulttable.errors = self.last_parsed_result.errors
       1021         return resulttable
    
    TableParseError: Failed to parse SIMBAD result! The raw response can be found in self.last_response, and the error in self.last_table_parse_error. The attempted parsed result is in self.last_parsed_result.
     Exception: No table found in VOTABLE file.
    
  3. bsipocz commented on Sep 12, 2018

    @bsipocz
    Member

    Weird. There were some recent changes since 0.3.7 in the module, but even with that version the snippet works for me.

    Could you check whether the payload and the url is same for you:

    In [5]: Simbad.query_object("QSO B0003-066", get_query_payload=True)
    Out[5]: {'script': '\nvotable {main_id,coordinates}\nvotable open\nquery id  QSO B0003-066  \nvotable close'}
    
    In [6]: Simbad.SIMBAD_URL
    Out[6]: 'http://simbad.u-strasbg.fr/simbad/sim-script'
    

    also, could you print out Simbad.last_response.content and Simbad.last_table_parse_error after the query produced the failure?

  4. aoberto commented on Sep 12, 2018

    @aoberto
    Contributor

    I assume that it was the same issue than #1232 : a temporary problem in Simbad. It was resolved few hours ago, may be there is some cache ?

  5. bsipocz commented on Sep 12, 2018

    @bsipocz
    Member

    @Roman-UCLU - please try to clear the cache, Simbad.cache_location tells you the location.

  6. Roman-UCLU commented on Sep 13, 2018

    @Roman-UCLU
    Author

    Sorry for the delay.

    Indeed, this was a caching issue. I deleted everything from the directory returned by Simbad.cache_location and that cut it!

    Thank you so much, everyone!

  7. Negar3362 commented on Sep 3, 2023

    @Negar3362

    Hello, I'm having the same problem with Ned query even after clearing the cache. Using different astropy and astroquery versions, I am still facing the same issue. Are there any solutions to this problem? Thanks.

    Here is The code and error:

    from astroquery.ipac.ned import Ned
    result_table = Ned.query_object('NGC 224')

    IndexError: No table found in VOTABLE file.

  8. keflavich commented on Sep 3, 2023

    @keflavich
    Contributor

    @Negar3362 what versions of astropy & astroquery are you using? With astropy, astroquery = ('5.1', '0.4.7.dev8846'), I don't see this issue.

  9. Negar3362 commented on Sep 3, 2023

    @Negar3362

    @keflavich The version of Astroquery I'm using is 0.4.6. I'll try 0.4.7 as well. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions