Skip to content

SkyCoord NameResolveError in 5_Euclid_intro_SPE_catalog.md #155

@troyraen

Description

@troyraen

Interesting error in 5_Euclid_intro_SPE_catalog.md. Looks like this could be fixed by increasing astropy.utils.data.Conf.remote_timeout if it happens repeatedly. https://docs.astropy.org/en/stable/api/astropy.coordinates.SkyCoord.html#astropy.coordinates.SkyCoord.from_name

CircleCI job: https://app.circleci.com/pipelines/github/Caltech-IPAC/irsa-tutorials/532/workflows/a207e43c-736d-4cbc-9232-b24e76445992/jobs/537/

⛔️ tutorials/euclid_access/5_Euclid_intro_SPE_catalog.md An exception occurred during code execution, halting further execution:

---------------------------------------------------------------------------
NameResolveError                          Traceback (most recent call last)
Cell In[3], line 2
      1 search_radius = 10 * u.arcsec
----> 2 coord = SkyCoord.from_name('HD 168151')

File ~/project/.tox/py312-buildhtml/lib/python3.12/site-packages/astropy/coordinates/sky_coordinate.py:1905, in SkyCoord.from_name(cls, name, frame, parse, cache)
   1871 """
   1872 Given a name, query the CDS name resolver to attempt to retrieve
   1873 coordinate information for that object. The search database, sesame
   (...)   1901     Instance of the SkyCoord class.
   1902 """
   1903 from .name_resolve import get_icrs_coordinates
-> 1905 icrs_coord = get_icrs_coordinates(name, parse, cache=cache)
   1906 icrs_sky_coord = cls(icrs_coord)
   1907 if frame in ("icrs", icrs_coord.__class__):

File ~/project/.tox/py312-buildhtml/lib/python3.12/site-packages/astropy/coordinates/name_resolve.py:196, in get_icrs_coordinates(name, parse, cache)
    193 # All Sesame URL's failed...
    194 else:
    195     messages = [f"{url}: {e.reason}" for url, e in zip(urls, exceptions)]
--> 196     raise NameResolveError(
    197         "All Sesame queries failed. Unable to retrieve coordinates. See errors per"
    198         f" URL below: \n {os.linesep.join(messages)}"
    199     )
    201 ra, dec = _parse_response(resp_data)
    203 if ra is None or dec is None:

NameResolveError: All Sesame queries failed. Unable to retrieve coordinates. See errors per URL below: 
 https://cds.unistra.fr/cgi-bin/nph-sesame/SNV?HD%20168151: Request took longer than the allowed 10.0 seconds
http://vizier.cfa.harvard.edu/viz-bin/nph-sesame/SNV?HD%20168151: Request took longer than the allowed 10.0 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontent: euclidContent related issues/PRs for notebooks with Euclid relevance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions