
    HR-e                        d Z ddlZddlZddlmZ ddlmZ ddlmZ	 ddl
mZ g dZ G d d	e	j                  Z e            Zdd
ZddZ	 ddZddZddZddZg dfdZ ej        d          Zd Z G d de          Z G d dee          Z G d dee          Z G d dee          Z G d d ee          Z  G d! d"ee!          Z" G d# d$e          Z# G d% d&e          Z$ G d' d(e          Z% G d) d*e          Z& G d+ d,e          Z' G d- d.e          Z( G d/ d0e          Z) G d1 d2e          Z* G d3 d4e          Z+ G d5 d6e          Z, G d7 d8e          Z- G d9 d:e          Z. G d; d<e          Z/ G d= d>e          Z0 G d? d@e          Z1 G dA dBe          Z2 G dC dDe          Z3 G dE dFe          Z4 G dG dHe          Z5 G dI dJe          Z6 G dK dLe           Z7 G dM dNee8          Z9 G dO dPe           Z: G dQ dRe          Z; G dS dTe          Z< G dU dVe          Z= G dW dXe          Z> G dY dZe          Z? G d[ d\e          Z@ G d] d^e          ZA G d_ d`e          ZB G da dbe          ZC G dc dde          ZD G de dfe          ZE G dg dhe          ZF G di dje          ZG G dk dle          ZH G dm dne          ZI G do dpe          ZJ G dq dre          ZK G ds dte          ZL G du dve          ZM G dw dxee!          ZN G dy dze          ZO G d{ d|e          ZP G d} d~e          ZQ G d de          ZR G d de          ZS G d de          ZT G d de          ZU G d de          ZV G d de          ZW G d de          ZX G d dee!          ZY G d dee!          ZZ G d dee!          Z[ G d dee!          Z\ G d dee!          Z] G d dee!          Z^ G d dee!          Z_ G d dee!          Z` G d dee!          Za G d dee!          Zb G d dee!          Zc G d dee!          Zd G d dee!          Ze G d dee!          Zf G d de          Zg G d dee!          Zh G d dee!          Zi G d dee!          Zj G d de"          Zk G d dee!          Zl G d dee!          Zm G d de          Zn G d dee!          Zo G d de          Zpd Zqd Zre  e js        di  er            Z et                    d  eqd          D                        et                    d  eqd¦          D                        dS )a  VOTable exceptions and warnings.

.. _warnings:

Warnings
--------
.. note::
    Most of the following warnings indicate violations of the VOTable
    specification.  They should be reported to the authors of the
    tools that produced the VOTable file.

    To control the warnings emitted, use the standard Python
    :mod:`warnings` module and the ``astropy.io.votable.exceptions.conf.max_warnings``
    configuration item.  Most of these are of the type `VOTableSpecWarning`.

{warnings}

.. _exceptions:

Exceptions
----------

.. note::

    This is a list of many of the fatal exceptions emitted by ``astropy.io.votable``
    when the file does not conform to spec.  Other exceptions may be
    raised due to unforeseen cases or bugs in ``astropy.io.votable`` itself.

{exceptions}
    N)dedent)warn)config)AstropyWarning)Confconfwarn_or_raisevo_raise
vo_reraisevo_warnwarn_unknown_attrsparse_vowarning	VOWarningVOTableChangeWarningVOTableSpecWarningUnimplementedWarning	IOWarningVOTableSpecErrorc                   8    e Zd ZdZ ej        ddd          ZdS )r   zG
    Configuration parameters for `astropy.io.votable.exceptions`.
    
   zMNumber of times the same type of warning is displayed before being suppressedinteger)cfgtypeN)__name__
__module____qualname____doc___config
ConfigItemmax_warnings     =lib/python3.11/site-packages/astropy/io/votable/exceptions.pyr   r   =   s<          &7%
W  LLLr!   r   c           	      v    |i }|d}|                     dd          }| d|d          d|d          d| d|  	S )N)?r$   filenamer$   :r      : )get)messagenamer   posr%   s        r"   _format_messager-   L   s]    ~
{zz*c**H==Q==#a&==D==G===r!      c                 d   t          |           }|                    dt                                                    |d           |d         |xx         dz  cc<   |d         |         }|t          j        k    r6|t          j        k    r| xj        dz  c_        t          | |dz              d S d S )N_warning_countsr   r'   z/ (suppressing further warnings of this type...)
stacklevel)type
setdefaultdictr   r   formatted_messager   )warningr   r2   warning_classmessage_counts        r"   _suppressed_warningr:   U   s    MMM
'00;;M1MMM
m,,,1,,,,-m<M)))D---%%A%% 	Wa000000 *)r!   r    r'   c                     |i }|                     dd          }|dk    r|| }t          ||||           dS |dk    rt          | ||||dz              dS dS )zF
    Warn or raise an exception, depending on the verify setting.
    Nverifyr   	exceptionr'   r1   )r)   r
   r   )r8   exception_classargsr   r,   r2   config_values          r"   r	   r	   b   s     ~ ::h//L{"""+O$44444			tVSZ!^LLLLLL 
 	r!   c                 $    |i } | |||          )zL
    Raise an exception, with proper position information if available.
    r    )r>   r?   r   r,   s       r"   r
   r
   v   s"     ~
/$
,
,,r!    c                 B   |i }t          t          |           | j        j        ||          }|                                d         t          |                                           d         k    rt          |           }t          |          r|d|z   z  }|f| _        | )z
    Raise an exception, with proper position information if available.

    Restores the original traceback of the exception, and should only
    be called within an "except:" block of code.
    Nr    )r-   str	__class__r   splitlenr?   )excr   r,   
additionalr*   s        r"   r   r      s     ~c#hh(>LLG}}qSXX^^--a000c((
: $3##zCH
Ir!   c                     |i }|                     dd          dk    r$ | |||          }t          |||dz              dS dS )z>
    Warn, with proper position information if available.
    Nr<   r   ignorer'   r1   )r)   r:   )r8   r?   r   r,   r2   r7   s         r"   r   r      sc     ~ zz(F##x//-fc22GV
QGGGGGG 0/r!   c           	      T    |D ]$}||vrt          t          || f|||dz              %d S )Nr'   r1   )r   W48)elementattrsr   r,   	good_attrr2   attrs          r"   r   r      sL     R Ry  C$&#*q.QQQQR Rr!   zO:?(?P<nline>[0-9?]+):(?P<nchar>[0-9?]+): ((?P<warning>[WE]\d+): )?(?P<rest>.*)$c                 T   i }t                               |           }|r@|                    d          x|d<   }|u|d                                         dk    |d<   |d          |d<   t	          |                    d          dd                   |d<   d	|                                 |d
<   nd|d<   d|d<   d|d<   d|d<   d|d
<   	 t	          |                    d                    |d<   n# t          $ r d|d<   Y nw xY w	 t	          |                    d                    |d<   n# t          $ r d|d<   Y nw xY w|                    d          |d<   d|d<   nHd|d<   d|d<   d|d<   d|d<   d|d<   t          | t                    s| 	                    d          } | |d<   |S )z;
    Parses the vo warning string back into its parts.
    r7   Nr   W
is_warningis_exceptionr'   numberzio/votable/api_exceptions.html#doc_urlFTis_othernlinencharrestr*   is_somethingutf-8)
_warning_patsearchgroupupperintlower
ValueError
isinstancerE   decode)lineresultmatchr7   s       r"   r   r      s    F%%E !&+kk)&<&<<yG#*1:#3#3#5#5#<F< )/)=%=F>""5;;y#9#9!""#=>>F8 S'--// S SF9#(F< %*F>"!%F:#F8 $F9	 !%++g"6"677F7OO 	  	  	 F7OOO	 	 !%++g"6"677F7OO 	  	  	 F7OOO	 !KK//y!%~ y$|!&~"z!&~$$$ 	(;;w''D yMs$   %C1 1DD%D- -D?>D?c                   >    e Zd ZdZdZdZddZd Zed             Z	dS )	r   z
    The base class of all VO warnings and exceptions.

    Handles the formatting of the message with a warning or exception
    code, filename, line and column number.
    r    rB   Nc                     |i }t          |t                    s|f} | j        j        | }t	          || j        j        ||          | _        t          	                    | | j                   d S N)
rf   tuplemessage_templateformatr-   rF   r   r6   Warning__init__)selfr?   r   r,   msgs        r"   rr   zVOWarning.__init__   sx    >F$&& 	7D*d#*D1!0(&#"
 "
 	t566666r!   c                     | j         S rm   )r6   )rs   s    r"   __str__zVOWarning.__str__   s    %%r!   c                 `    t          | j                  r | j        j        | j         S | j        S rm   )rH   default_argsro   rp   )clss    r"   get_short_namezVOWarning.get_short_name   s5    s   	B.3'.0@AA##r!   NN)
r   r   r   r   rx   ro   rr   rv   classmethodrz   r    r!   r"   r   r      si          L
7 
7 
7 
7& & & $ $ [$ $ $r!   r   c                       e Zd ZdZdS )r   z7
    A change has been made to the input XML file.
    Nr   r   r   r   r    r!   r"   r   r                 r!   r   c                       e Zd ZdZdS )r   zS
    The input XML file violates the spec, but there is an obvious workaround.
    Nr~   r    r!   r"   r   r      r   r!   r   c                       e Zd ZdZdS )r   z<
    A feature of the VOTABLE_ spec is not implemented.
    Nr~   r    r!   r"   r   r     r   r!   r   c                       e Zd ZdZdS )r   zL
    A network or IO error occurred, but was recovered using the cache.
    Nr~   r    r!   r"   r   r     r   r!   r   c                       e Zd ZdZdS )r   zO
    The input XML file violates the spec and there is no good workaround.
    Nr~   r    r!   r"   r   r     r   r!   r   c                       e Zd ZdZdZdS )W01a  Array uses commas rather than whitespace.

    The VOTable spec states:

        If a cell contains an array or complex number, it should be
        encoded as multiple numbers separated by whitespace.

    Many VOTable files in the wild use commas as a separator instead,
    and ``astropy.io.votable`` can support this convention depending on the
    :ref:`astropy:verifying-votables` setting.

    ``astropy.io.votable`` always outputs files using only spaces, regardless of
    how they were input.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#toc-header-35>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:TABLEDATA>`__
    z(Array uses commas rather than whitespaceNr   r   r   r   ro   r    r!   r"   r   r     s#         ( Br!   r   c                       e Zd ZdZdZdZdS )W02a  Nonstandard XML id.

    XML ids must match the following regular expression::

        ^[A-Za-z_][A-Za-z0-9_\.\-]*$

    The VOTable 1.1 says the following:

        According to the XML standard, the attribute ``ID`` is a
        string beginning with a letter or underscore (``_``), followed
        by a sequence of letters, digits, or any of the punctuation
        characters ``.`` (dot), ``-`` (dash), ``_`` (underscore), or
        ``:`` (colon).

    However, this is in conflict with the XML standard, which says
    colons may not be used.  VOTable 1.1's own schema does not allow a
    colon here.  Therefore, ``astropy.io.votable`` disallows the colon.

    VOTable 1.2 corrects this error in the specification.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:name>`__,
    `XML Names <https://www.w3.org/TR/xml-names/>`__
    z8{} attribute '{}' is invalid.  Must be a standard XML idxyNr   r   r   r   ro   rx   r    r!   r"   r   r   ,  s&         2 RLLLr!   r   c                       e Zd ZdZdZdZdS )W03a	  Implicitly generating an ID from a name.

    The VOTable 1.1 spec says the following about ``name`` vs. ``ID``
    on ``FIELD`` and ``VALUE`` elements:

        ``ID`` and ``name`` attributes have a different role in
        VOTable: the ``ID`` is meant as a *unique identifier* of an
        element seen as a VOTable component, while the ``name`` is
        meant for presentation purposes, and need not to be unique
        throughout the VOTable document. The ``ID`` attribute is
        therefore required in the elements which have to be
        referenced, but in principle any element may have an ``ID``
        attribute. ... In summary, the ``ID`` is different from the
        ``name`` attribute in that (a) the ``ID`` attribute is made
        from a restricted character set, and must be unique throughout
        a VOTable document whereas names are standard XML attributes
        and need not be unique; and (b) there should be support in the
        parsing software to look up references and extract the
        relevant element with matching ``ID``.

    It is further recommended in the VOTable 1.2 spec:

        While the ``ID`` attribute has to be unique in a VOTable
        document, the ``name`` attribute need not. It is however
        recommended, as a good practice, to assign unique names within
        a ``TABLE`` element. This recommendation means that, between a
        ``TABLE`` and its corresponding closing ``TABLE`` tag,
        ``name`` attributes of ``FIELD``, ``PARAM`` and optional
        ``GROUP`` elements should be all different.

    Since ``astropy.io.votable`` requires a unique identifier for each of its
    columns, ``ID`` is used for the column name when present.
    However, when ``ID`` is not present, (since it is not required by
    the specification) ``name`` is used instead.  However, ``name``
    must be cleansed by replacing invalid characters (such as
    whitespace) with underscores.

    .. note::
        This warning does not indicate that the input file is invalid
        with respect to the VOTable specification, only that the
        column names in the record array may not match exactly the
        ``name`` attributes specified in the file.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:name>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:name>`__
    z4Implicitly generating an ID from a name '{}' -> '{}'r   Nr   r    r!   r"   r   r   J  s'        / /b NLLLr!   r   c                       e Zd ZdZdZdZdS )W04a  
    The ``content-type`` attribute must use MIME content-type syntax as
    defined in `RFC 2046 <https://tools.ietf.org/html/rfc2046>`__.

    The current check for validity is somewhat over-permissive.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:link>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:link>`__
    z3content-type '{}' must be a valid MIME content typer   Nr   r    r!   r"   r   r     s&        
 
 MLLLr!   r   c                       e Zd ZdZdZdZdS )W05zq
    The attribute must be a valid URI as defined in `RFC 2396
    <https://www.ietf.org/rfc/rfc2396.txt>`_.
    z'{}' is not a valid URIr   Nr   r    r!   r"   r   r     s%         
 1LLLr!   r   c                       e Zd ZdZdZdZdS )W06a  
    This warning is emitted when a ``ucd`` attribute does not match
    the syntax of a `unified content descriptor
    <https://vizier.unistra.fr/doc/UCD.htx>`__.

    If the VOTable version is 1.2 or later, the UCD will also be
    checked to ensure it conforms to the controlled vocabulary defined
    by UCD1+.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:ucd>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:ucd>`__
    zInvalid UCD '{}': {})r   explanationNr   r    r!   r"   r   r     s%          .'LLLr!   r   c                       e Zd ZdZdZdZdS )W07a  Invalid astroYear.

    As astro year field is a Besselian or Julian year matching the
    regular expression::

        ^[JB]?[0-9]+([.][0-9]*)?$

    Defined in this XML Schema snippet::

        <xs:simpleType  name="astroYear">
          <xs:restriction base="xs:token">
            <xs:pattern  value="[JB]?[0-9]+([.][0-9]*)?"/>
          </xs:restriction>
        </xs:simpleType>
    zInvalid astroYear in {}: '{}'r   Nr   r    r!   r"   r   r     s%           7LLLr!   r   c                       e Zd ZdZdZdZdS )W08z
    To avoid local-dependent number parsing differences, ``astropy.io.votable``
    may require a string or unicode string where a numeric type may
    make more sense.
    z"'{}' must be a str or bytes objectr   Nr   r    r!   r"   r   r     s%          <LLLr!   r   c                       e Zd ZdZdZdS )W09a  
    The VOTable specification uses the attribute name ``ID`` (with
    uppercase letters) to specify unique identifiers.  Some
    VOTable-producing tools use the more standard lowercase ``id``
    instead. ``astropy.io.votable`` accepts ``id`` and emits this warning if
    ``verify`` is ``'warn'``.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:name>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:name>`__
    zID attribute not capitalizedNr   r    r!   r"   r   r     s"          6r!   r   c                       e Zd ZdZdZdZdS )W10aS  
    The parser has encountered an element that does not exist in the
    specification, or appears in an invalid context.  Check the file
    against the VOTable schema (with a tool such as `xmllint
    <http://xmlsoft.org/xmllint.html>`__.  If the file validates
    against the schema, and you still receive this warning, this may
    indicate a bug in ``astropy.io.votable``.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#ToC54>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#ToC58>`__
    zUnknown tag '{}'.  Ignoringr   Nr   r    r!   r"   r   r     s%          5LLLr!   r   c                       e Zd ZdZdZdS )W11a  
    Earlier versions of the VOTable specification used a ``gref``
    attribute on the ``LINK`` element to specify a `GLU reference
    <http://aladin.unistra.fr/glu/>`__.  New files should
    specify a ``glu:`` protocol using the ``href`` attribute.

    Since ``astropy.io.votable`` does not currently support GLU references, it
    likewise does not automatically convert the ``gref`` attribute to
    the new form.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:link>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:link>`__
    z7The gref attribute on LINK is deprecated in VOTable 1.1Nr   r    r!   r"   r   r     s#           Qr!   r   c                       e Zd ZdZdZdZdS )W12a  
    In order to name the columns of the Numpy record array, each
    ``FIELD`` element must have either an ``ID`` or ``name`` attribute
    to derive a name from.  Strictly speaking, according to the
    VOTable schema, the ``name`` attribute is required.  However, if
    ``name`` is not present by ``ID`` is, and ``verify`` is not ``'exception'``,
    ``astropy.io.votable`` will continue without a ``name`` defined.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:name>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:name>`__
    z@'{}' element must have at least one of 'ID' or 'name' attributesr   Nr   r    r!   r"   r   r     s*          	K  LLLr!   r   c                       e Zd ZdZdZdZdS )W13a  Invalid VOTable datatype.

    Some VOTable files in the wild use non-standard datatype names.  These
    are mapped to standard ones using the following mapping::

       string        -> char
       unicodeString -> unicodeChar
       int16         -> short
       int32         -> int
       int64         -> long
       float32       -> float
       float64       -> double
       unsignedInt   -> long
       unsignedShort -> int

    To add more datatype mappings during parsing, use the
    ``datatype_mapping`` keyword to `astropy.io.votable.parse`.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:datatypes>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:datatypes>`__
    z4'{}' is not a valid VOTable datatype, should be '{}'r   Nr   r    r!   r"   r   r     s&         0 NLLLr!   r   c                       e Zd ZdZdZdZdS )W15a  
    The ``name`` attribute is required on every ``FIELD`` element.
    However, many VOTable files in the wild omit it and provide only
    an ``ID`` instead.  In this case, when ``verify`` is not ``'exception'``
    ``astropy.io.votable`` will copy the ``name`` attribute to a new ``ID``
    attribute.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:name>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:name>`__
    z,{} element missing required 'name' attributer   Nr   r    r!   r"   r   r   =  s&          FLLLr!   r   c                       e Zd ZdZdZdZdS )W17a  
    A ``DESCRIPTION`` element can only appear once within its parent
    element.

    According to the schema, it may only occur once (`1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#ToC54>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#ToC58>`__)

    However, it is a `proposed extension
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:addesc>`__
    to VOTable 1.2.
    z5{} element contains more than one DESCRIPTION elementr   Nr   r    r!   r"   r   r   R  s&          OLLLr!   r   c                       e Zd ZdZdZdZdS )W18aB  
    The number of rows explicitly specified in the ``nrows`` attribute
    does not match the actual number of rows (``TR`` elements) present
    in the ``TABLE``.  This may indicate truncation of the file, or an
    internal error in the tool that produced it.  If ``verify`` is not
    ``'exception'``, parsing will proceed, with the loss of some performance.

    **References:** `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#ToC10>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#ToC10>`__
    z4TABLE specified nrows={}, but table contains {} rowsr   Nr   r    r!   r"   r   r   e  s&          NLLLr!   r   c                       e Zd ZdZdZdS )W19z
    The column fields as defined using ``FIELD`` elements do not match
    those in the headers of the embedded FITS file.  If ``verify`` is not
    ``'exception'``, the embedded FITS file will take precedence.
    zNThe fields defined in the VOTable do not match those in the embedded FITS fileNr   r    r!   r"   r   r   w  s$         	 r!   r   c                       e Zd ZdZdZdZdS )W20z
    If no version number is explicitly given in the VOTable file, the
    parser assumes it is written to the VOTable 1.1 specification.
    z1No version number specified in file.  Assuming {})z1.1Nr   r    r!   r"   r   r     s&         
 KLLLr!   r   c                       e Zd ZdZdZdZdS )W21z
    Unknown issues may arise using ``astropy.io.votable`` with VOTable files
    from a version other than 1.1, 1.2, 1.3, or 1.4.
    z^astropy.io.votable is designed for VOTable version 1.1, 1.2, 1.3, and 1.4, but this file is {}r   Nr   r    r!   r"   r   r     s)         	(  LLLr!   r   c                       e Zd ZdZdZdS )W22a  
    Version 1.0 of the VOTable specification used the ``DEFINITIONS``
    element to define coordinate systems.  Version 1.1 now uses
    ``COOSYS`` elements throughout the document.

    **References:** `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:definitions>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:definitions>`__
    z?The DEFINITIONS element is deprecated in VOTable 1.1.  IgnoringNr   r    r!   r"   r   r     s#        	 	 Yr!   r   c                       e Zd ZdZdZdZdS )W23z
    Raised when the VO service database can not be updated (possibly
    due to a network outage).  This is only a warning, since an older
    and possible out-of-date VO service database was available
    locally.
    z-Unable to update service information for '{}'r   Nr   r    r!   r"   r   r     s&          GLLLr!   r   c                       e Zd ZdZdZdS )W24a
  
    The VO catalog database retrieved from the www is designed for a
    newer version of ``astropy.io.votable``.  This may cause problems or limited
    features performing service queries.  Consider upgrading ``astropy.io.votable``
    to the latest version.
    zDThe VO catalog database is for a later version of astropy.io.votableNr   r    r!   r"   r   r     s%          	O r!   r   c                       e Zd ZdZdZdZdS )W25z
    A VO service query failed due to a network error or malformed
    arguments.  Another alternative service may be attempted.  If all
    services fail, an exception will be raised.
    z'{}' failed with: {})servicez...Nr   r    r!   r"   r   r     s%          .%LLLr!   r   c                       e Zd ZdZdZdZdS )W26z
    The given element was not supported inside of the given element
    until the specified VOTable version, however the version declared
    in the file is for an earlier version.  These attributes may not
    be written out to the file.
    z$'{}' inside '{}' added in VOTable {})childparentX.XNr   r    r!   r"   r   r     s%          >-LLLr!   r   c                       e Zd ZdZdZdS )W27ad  
    The ``COOSYS`` element was deprecated in VOTABLE version 1.2 in
    favor of a reference to the Space-Time Coordinate (STC) data
    model (see `utype
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:utype>`__
    and the IVOA note `referencing STC in VOTable
    <http://ivoa.net/Documents/latest/VOTableSTC.html>`__.
    z COOSYS deprecated in VOTable 1.2Nr   r    r!   r"   r   r     s"          :r!   r   c                       e Zd ZdZdZdZdS )W28z
    The given attribute was not supported on the given element until the
    specified VOTable version, however the version declared in the file is
    for an earlier version.  These attributes may not be written out to
    the file.
    z '{}' on '{}' added in VOTable {})	attributerO   r   Nr   r    r!   r"   r   r     s%          :2LLLr!   r   c                       e Zd ZdZdZdZdS )W29aY  
    Some VOTable files specify their version number in the form "v1.0",
    when the only supported forms in the spec are "1.0".

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#ToC54>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#ToC58>`__
    z+Version specified in non-standard form '{}')zv1.0Nr   r    r!   r"   r   r     s&          ELLLr!   r   c                       e Zd ZdZdZdZdS )W30a  
    Some VOTable files write missing floating-point values in non-standard ways,
    such as "null" and "-".  If ``verify`` is not ``'exception'``, any
    non-standard floating-point literals are treated as missing values.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:datatypes>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:datatypes>`__
    z3Invalid literal for float '{}'.  Treating as empty.r   Nr   r    r!   r"   r   r     s&        	 	 MLLLr!   r   c                       e Zd ZdZdZdS )W31a  
    Since NaN's can not be represented in integer fields directly, a null
    value must be specified in the FIELD descriptor to support reading
    NaN's from the tabledata.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:datatypes>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:datatypes>`__
    z=NaN given in an integral field without a specified null valueNr   r    r!   r"   r   r     s#        	 	 Wr!   r   c                       e Zd ZdZdZdZdS )W32a  
    Each field in a table must have a unique ID.  If two or more fields
    have the same ID, some will be renamed to ensure that all IDs are
    unique.

    From the VOTable 1.2 spec:

        The ``ID`` and ``ref`` attributes are defined as XML types
        ``ID`` and ``IDREF`` respectively. This means that the
        contents of ``ID`` is an identifier which must be unique
        throughout a VOTable document, and that the contents of the
        ``ref`` attribute represents a reference to an identifier
        which must exist in the VOTable document.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:name>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:name>`__
    z6Duplicate ID '{}' renamed to '{}' to ensure uniquenessr   x_2Nr   r    r!   r"   r   r   !  s&         ( PLLLr!   r   c                       e Zd ZdZdZdZdS )W33a~  
    Each field in a table must have a unique name.  If two or more
    fields have the same name, some will be renamed to ensure that all
    names are unique.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:name>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:name>`__
    z5Column name '{}' renamed to '{}' to ensure uniquenessr   Nr   r    r!   r"   r   r   :  s&        	 	 OLLLr!   r   c                       e Zd ZdZdZdZdS )W34z
    The attribute requires the value to be a valid XML token, as
    defined by `XML 1.0
    <http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Nmtoken>`__.
    z+'{}' is an invalid token for attribute '{}'r   Nr   r    r!   r"   r   r   J  s&          ELLLr!   r   c                       e Zd ZdZdZdZdS )W35a-  
    The ``name`` and ``value`` attributes are required on all ``INFO``
    elements.

    **References:** `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#ToC54>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#ToC32>`__
    z)'{}' attribute required for INFO elementsr   Nr   r    r!   r"   r   r   U  s&          CLLLr!   r   c                       e Zd ZdZdZdZdS )W36aF  
    If the field specifies a ``null`` value, that value must conform
    to the given ``datatype``.

    **References:** `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:values>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:values>`__
    z;null value '{}' does not match field datatype, setting to 0r   Nr   r    r!   r"   r   r   d  s&          ULLLr!   r   c                       e Zd ZdZdZdZdS )W37ao  
    The 3 datatypes defined in the VOTable specification and supported by
    ``astropy.io.votable`` are ``TABLEDATA``, ``BINARY`` and ``FITS``.

    **References:** `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:data>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:data>`__
    zUnsupported data format '{}'r   Nr   r    r!   r"   r   r   s  s%          6LLLr!   r   c                       e Zd ZdZdZdZdS )W38zg
    The only encoding for local binary data supported by the VOTable
    specification is base64.
    z3Inline binary data must be base64 encoded, got '{}'r   Nr   r    r!   r"   r   r     s&         
 MLLLr!   r   c                       e Zd ZdZdZdS )W39aU  
    Bit values do not support masking.  This warning is raised upon
    setting masked data in a bit column.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:datatypes>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:datatypes>`__
    zBit values can not be maskedNr   r    r!   r"   r   r     s"          6r!   r   c                       e Zd ZdZdZdS )W40a  
    This is a terrible hack to support Simple Image Access Protocol
    results from `NOIRLab Astro Data Archive <https://astroarchive.noirlab.edu/>`__.  It
    creates a field for the coordinate projection type of type "double",
    which actually contains character data.  We have to hack the field
    to store character data, or we can't read it in.  A warning will be
    raised when this happens.
    z'cprojection' datatype repairedNr   r    r!   r"   r   r     s"          9r!   r   c                       e Zd ZdZdZdZdS )W41a  
    An XML namespace was specified on the ``VOTABLE`` element, but the
    namespace does not match what is expected for a ``VOTABLE`` file.

    The ``VOTABLE`` namespace is::

      http://www.ivoa.net/xml/VOTable/vX.X

    where "X.X" is the version number.

    Some files in the wild set the namespace to the location of the
    VOTable schema, which is not correct and will not pass some
    validating parsers.
    zIAn XML namespace is specified, but is incorrect.  Expected '{}', got '{}'r   Nr   r    r!   r"   r   r     s*           	T  LLLr!   r   c                       e Zd ZdZdZdS )W42zThe root element should specify a namespace.

    The ``VOTABLE`` namespace is::

        http://www.ivoa.net/xml/VOTable/vX.X

    where "X.X" is the version number.
    zNo XML namespace specifiedNr   r    r!   r"   r   r     s"          4r!   r   c                       e Zd ZdZdZdZdS )W43zReferenced elements should be defined before referees.

    From the VOTable 1.2 spec:

       In VOTable1.2, it is further recommended to place the ID
       attribute prior to referencing it whenever possible.
    z.{} ref='{}' which has not already been defined)rO   r   Nr   r    r!   r"   r   r     s&          H#LLLr!   r   c                       e Zd ZdZdZdZdS )W44a  
    ``VALUES`` elements that reference another element should not have
    their own content.

    From the VOTable 1.2 spec:

        The ``ref`` attribute of a ``VALUES`` element can be used to
        avoid a repetition of the domain definition, by referring to a
        previously defined ``VALUES`` element having the referenced
        ``ID`` attribute. When specified, the ``ref`` attribute
        defines completely the domain without any other element or
        attribute, as e.g. ``<VALUES ref="RAdomain"/>``
    z4VALUES element with ref attribute has content ('{}'))rO   Nr   r    r!   r"   r   r     s&          NLLLr!   r   c                       e Zd ZdZdZdZdS )W45a  Invalid content-role attribute.

    The ``content-role`` attribute on the ``LINK`` element must be one of
    the following::

        query, hints, doc, location

    And in VOTable 1.3, additionally::

        type

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#ToC54>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#ToC58>`__
    `1.3
    <http://www.ivoa.net/documents/VOTable/20130315/PR-VOTable-1.3-20130315.html#sec:link>`__
    z#content-role attribute '{}' invalidr   Nr   r    r!   r"   r   r     s%         & =LLLr!   r   c                       e Zd ZdZdZdZdS )W46zZ
    The given char or unicode string is too long for the specified
    field length.
    z/{} value is too long for specified length of {})zchar or unicoder   Nr   r    r!   r"   r   r     s&         
 I+LLLr!   r   c                       e Zd ZdZdZdS )W47z
    If no arraysize is specified on a char field, the default of '1'
    is implied, but this is rarely what is intended.
    z$Missing arraysize indicates length 1Nr   r    r!   r"   r   r     "         
 >r!   r   c                       e Zd ZdZdZdZdS )rN   z<
    The attribute is not defined in the specification.
    zUnknown attribute '{}' on {})r   rO   Nr   r    r!   r"   rN   rN     s%          6+LLLr!   rN   c                       e Zd ZdZdZdS )W49z
    Prior to VOTable 1.3, the empty cell was illegal for integer
    fields.

    If a "null" value was specified for the cell, it will be used
    for the value, otherwise, 0 will be used.
    z&Empty cell illegal for integer fields.Nr   r    r!   r"   r   r     s#          @r!   r   c                       e Zd ZdZdZdZdS )W50a  
    Invalid unit string as defined in the `Units in the VO, Version 1.0
    <https://www.ivoa.net/documents/VOUnits>`_ (VOTable version >= 1.4)
    or `Standards for Astronomical Catalogues, Version 2.0
    <https://cdsarc.cds.unistra.fr/doc/catstd-3.2.htx>`_ (version < 1.4).

    Consider passing an explicit ``unit_format`` parameter if the units
    in this file conform to another specification.
    zInvalid unit string '{}'r   Nr   r    r!   r"   r   r   *  s%          2LLLr!   r   c                       e Zd ZdZdZdZdS )W51zF
    The integer value is out of range for the size of the field.
    z1Value '{}' is out of range for a {} integer field)r   zn-bitNr   r    r!   r"   r   r   9  s&          K!LLLr!   r   c                       e Zd ZdZdZdZdS )W52z
    The BINARY2 format was introduced in VOTable 1.3.  It should
    not be present in files marked as an earlier version.
    z[The BINARY2 format was introduced in VOTable 1.3, but this file is declared as version '{}')z1.2Nr   r    r!   r"   r   r   B  )         	0  LLLr!   r   c                       e Zd ZdZdZdZdS )W53zI
    The VOTABLE element must contain at least one RESOURCE element.
    z;VOTABLE element must contain at least one RESOURCE element.r    Nr   r    r!   r"   r   r   O  s&          ULLLr!   r   c                       e Zd ZdZdZdZdS )W54z
    The TIMESYS element was introduced in VOTable 1.4.  It should
    not be present in files marked as an earlier version.
    z\The TIMESYS element was introduced in VOTable 1.4, but this file is declared as version '{}')z1.3Nr   r    r!   r"   r   r   X  r   r!   r   c                       e Zd ZdZdZdZdS )W55z
    When non-ASCII characters are detected when reading
    a TABLEDATA value for a FIELD with ``datatype="char"``, we
    can issue this warning.
    z@FIELD ({}) has datatype="char" but contains non-ASCII value ({})rB   rB   Nr   r    r!   r"   r   r   e  s*          	K  LLLr!   r   c                       e Zd ZdZdZdZdS )E01a  Invalid size specifier for a field.

    The size specifier for a ``char`` or ``unicode`` field must be
    only a number followed, optionally, by an asterisk.
    Multi-dimensional size specifiers are not supported for these
    datatypes.

    Strings, which are defined as a set of characters, can be
    represented in VOTable as a fixed- or variable-length array of
    characters::

        <FIELD name="unboundedString" datatype="char" arraysize="*"/>

    A 1D array of strings can be represented as a 2D array of
    characters, but given the logic above, it is possible to define a
    variable-length array of fixed-length strings, but not a
    fixed-length array of variable-length strings.
    z:Invalid size specifier '{}' for a {} field (in field '{}'))r   zchar/unicoder   Nr   r    r!   r"   r   r   r  s&         & T-LLLr!   r   c                       e Zd ZdZdZdZdS )E02zIncorrect number of elements in array.

    The number of array elements in the data does not match that specified
    in the FIELD specifier.
    zFIncorrect number of elements in array. Expected multiple of {}, got {}r   Nr   r    r!   r"   r  r    s*          	Q  LLLr!   r  c                       e Zd ZdZdZdZdS )E03a%  Complex numbers should be two values separated by whitespace.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:datatypes>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:datatypes>`__
    z''{}' does not parse as a complex numberr   Nr   r    r!   r"   r  r    s&          ALLLr!   r  c                       e Zd ZdZdZdZdS )E04a  A ``bit`` array should be a string of '0's and '1's.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:datatypes>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:datatypes>`__
    zInvalid bit value '{}'r   Nr   r    r!   r"   r  r    s%          0LLLr!   r  c                       e Zd ZdZdZdZdS )E05a  Invalid boolean value.

    A ``boolean`` value should be one of the following strings (case
    insensitive) in the ``TABLEDATA`` format::

        'TRUE', 'FALSE', '1', '0', 'T', 'F', '\0', ' ', '?'

    and in ``BINARY`` format::

        'T', 'F', '1', '0', '\0', ' ', '?'

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:datatypes>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:datatypes>`__
    zInvalid boolean value '{}'r   Nr   r    r!   r"   r  r    s%         " 4LLLr!   r  c                       e Zd ZdZdZdZdS )E06a  Unknown datatype on a field.

    The supported datatypes are::

        double, float, bit, boolean, unsignedByte, short, int, long,
        floatComplex, doubleComplex, char, unicodeChar

    The following non-standard aliases are also supported, but in
    these case :ref:`W13 <W13>` will be raised::

        string        -> char
        unicodeString -> unicodeChar
        int16         -> short
        int32         -> int
        int64         -> long
        float32       -> float
        float64       -> double
        unsignedInt   -> long
        unsignedShort -> int

    To add more datatype mappings during parsing, use the
    ``datatype_mapping`` keyword to `astropy.io.votable.parse`.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:datatypes>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:datatypes>`__
    z#Unknown datatype '{}' on field '{}'r   Nr   r    r!   r"   r	  r	    s%         : =LLLr!   r	  c                       e Zd ZdZdZdZdS )E08aC  
    The ``type`` attribute on the ``VALUES`` element must be either
    ``legal`` or ``actual``.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:values>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:values>`__
    z-type must be 'legal' or 'actual', but is '{}'r   Nr   r    r!   r"   r  r    s&          GLLLr!   r  c                       e Zd ZdZdZdZdS )E09a?  
    The ``MIN``, ``MAX`` and ``OPTION`` elements must always have a
    ``value`` attribute.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:values>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:values>`__
    z '{}' must have a value attributer   Nr   r    r!   r"   r  r    s%          :LLLr!   r  c                       e Zd ZdZdZdZdS )E10aG  
    From VOTable 1.1 and later, ``FIELD`` and ``PARAM`` elements must have
    a ``datatype`` field.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#elem:FIELD>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#elem:FIELD>`__
    z2'datatype' attribute required on all '{}' elements)FIELDNr   r    r!   r"   r  r  
  s&          LLLLr!   r  c                       e Zd ZdZdZdZdS )E11a  
    The precision attribute is meant to express the number of significant
    digits, either as a number of decimal places (e.g. ``precision="F2"`` or
    equivalently ``precision="2"`` to express 2 significant figures
    after the decimal point), or as a number of significant figures
    (e.g. ``precision="E5"`` indicates a relative precision of 10-5).

    It is validated using the following regular expression::

        [EF]?[1-9][0-9]*

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:form>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:form>`__
    zprecision '{}' is invalidr   Nr   r    r!   r"   r  r    s%         " 3LLLr!   r  c                       e Zd ZdZdZdZdS )E12ao  
    The width attribute is meant to indicate to the application the
    number of characters to be used for input or output of the
    quantity.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:form>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:form>`__
    z*width must be a positive integer, got '{}'r   Nr   r    r!   r"   r  r  /  s&        	 	 DLLLr!   r  c                       e Zd ZdZdZdZdS )E13u  Invalid arraysize attribute.

    From the VOTable 1.2 spec:

        A table cell can contain an array of a given primitive type,
        with a fixed or variable number of elements; the array may
        even be multidimensional. For instance, the position of a
        point in a 3D space can be defined by the following::

            <FIELD ID="point_3D" datatype="double" arraysize="3"/>

        and each cell corresponding to that definition must contain
        exactly 3 numbers. An asterisk (\*) may be appended to
        indicate a variable number of elements in the array, as in::

            <FIELD ID="values" datatype="int" arraysize="100*"/>

        where it is specified that each cell corresponding to that
        definition contains 0 to 100 integer numbers. The number may
        be omitted to specify an unbounded array (in practice up to
        =~2×10⁹ elements).

        A table cell can also contain a multidimensional array of a
        given primitive type. This is specified by a sequence of
        dimensions separated by the ``x`` character, with the first
        dimension changing fastest; as in the case of a simple array,
        the last dimension may be variable in length. As an example,
        the following definition declares a table cell which may
        contain a set of up to 10 images, each of 64×64 bytes::

            <FIELD ID="thumbs" datatype="unsignedByte" arraysize="64×64×10*"/>

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#sec:dim>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#sec:dim>`__
    z Invalid arraysize attribute '{}'r   Nr   r    r!   r"   r  r  ?  s&        $ $L :LLLr!   r  c                       e Zd ZdZdZdS )E14a  
    All ``PARAM`` elements must have a ``value`` attribute.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#elem:FIELD>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#elem:FIELD>`__
    z2value attribute is required for all PARAM elementsNr   r    r!   r"   r  r  j  s#          Lr!   r  c                       e Zd ZdZdZdS )E15zAll ``COOSYS`` elements must have an ``ID`` attribute.

    Note that the VOTable 1.1 specification says this attribute is
    optional, but its corresponding schema indicates it is required.

    In VOTable 1.2, the ``COOSYS`` element is deprecated.
    z0ID attribute is required for all COOSYS elementsNr   r    r!   r"   r  r  w  s#          Jr!   r  c                       e Zd ZdZdZdZdS )E16aj  Incorrect ``system`` attribute on COOSYS element.

    The ``system`` attribute must be one of the following::

      'eq_FK4', 'eq_FK5', 'ICRS', 'ecl_FK4', 'ecl_FK5', 'galactic',
      'supergalactic', 'xy', 'barycentric', 'geo_app'

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#elem:COOSYS>`__
    zInvalid system attribute '{}'r   Nr   r    r!   r"   r  r    s%        	 	 7LLLr!   r  c                       e Zd ZdZdZdS )E17a  
    ``extnum`` attribute must be a positive integer.

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#ToC54>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#ToC58>`__
    z!extnum must be a positive integerNr   r    r!   r"   r  r    s"          ;r!   r  c                       e Zd ZdZdZdZdS )E18a7  
    The ``type`` attribute of the ``RESOURCE`` element must be one of
    "results" or "meta".

    **References**: `1.1
    <http://www.ivoa.net/documents/VOTable/20040811/REC-VOTable-1.1-20040811.html#ToC54>`__,
    `1.2
    <http://www.ivoa.net/documents/VOTable/20091130/REC-VOTable-1.2.html#ToC58>`__
    z*type must be 'results' or 'meta', not '{}'r   Nr   r    r!   r"   r   r     s&          DLLLr!   r   c                       e Zd ZdZdZdS )E19zg
    Raised either when the file doesn't appear to be XML, or the root
    element is not VOTABLE.
    z$File does not appear to be a VOTABLENr   r    r!   r"   r"  r"    r   r!   r"  c                       e Zd ZdZdZdZdS )E20zd
    The table had only *x* fields defined, but the data itself has more
    columns than that.
    z9Data has more columns than are defined in the header ({})r   Nr   r    r!   r"   r$  r$    s&         
 SLLLr!   r$  c                       e Zd ZdZdZdZdS )E21zY
    The table had *x* fields defined, but the data itself has only *y*
    columns.
    z?Data has fewer columns ({}) than are defined in the header ({})r   Nr   r    r!   r"   r&  r&    s&         
 YLLLr!   r&  c                       e Zd ZdZdZdS )E22zA
    All ``TIMESYS`` elements must have an ``ID`` attribute.
    z1ID attribute is required for all TIMESYS elementsNr   r    r!   r"   r(  r(    s#          Kr!   r(  c                       e Zd ZdZdZdZdS )E23a}  
    The ``timeorigin`` attribute on the ``TIMESYS`` element must be
    either a floating point literal specifying a valid Julian Date,
    or, for convenience, the string "MJD-origin" (standing for 2400000.5)
    or the string "JD-origin" (standing for 0).

    **References**: `1.4
    <http://www.ivoa.net/documents/VOTable/20191021/REC-VOTable-1.4-20191021.html#ToC21>`__
    z!Invalid timeorigin attribute '{}'r   Nr   r    r!   r"   r*  r*    s%          ;LLLr!   r*  c                       e Zd ZdZdZdZdS )E24z
    Non-ASCII unicode values should not be written when the FIELD ``datatype="char"``,
    and cannot be written in BINARY or BINARY2 serialization.
    zMAttempt to write non-ASCII value ({}) to FIELD ({}) which has datatype="char"r   Nr   r    r!   r"   r,  r,    s*          	X  LLLr!   r,  c                       e Zd ZdZdZdS )E25z_
    A VOTable cannot have a DATA section without any defined FIELD; DATA will be ignored.
    z4No FIELDs are defined; DATA section will be ignored.Nr   r    r!   r"   r.  r.    s#          Nr!   r.  c                     g }t                                                      D ]4\  }}t          j        | dz   |          r|                    ||f           5|                                 |S )Nz[0-9]{2})globalsitemsrerj   appendsort)prefixclasseskeyvals       r"   "_get_warning_and_exception_classesr9    sj    GIIOO%% ' 'S8FZ'-- 	'NNC:&&&LLNNNNr!   c                  >    d }  | d          } | d          }||dS )Nc                    t          |           }t          j                    }|D ]3\  }}|                    d| d           |j         d|                                 }t          |t                    s|                    d          }|                    |           |                    d           |                    dt          |          z             |                    d           |j
        }t          |t                    s|                    d          }|                    t          |                     |                    d           5|                                S )Nz.. _z:

r(   r^   
~z

)r9  ioStringIOwriter   rz   rf   rE   rg   rH   r   r   getvalue)r5  r6  outr+   ry   rt   docs          r"   generate_setz'_build_doc_string.<locals>.generate_set  s@   4V<<kmm  	 	ID#II(T((()))\;;S%7%7%9%9;;Cc3'' *jj))IIcNNNIIdOOOIIcCHHn%%%IIf+Cc3'' *jj))IIfSkk"""IIf||~~r!   rT   E)warnings
exceptionsr    )rD  rF  rG  s      r"   _build_doc_stringrH     s?      , |C  Hc""J 
;;;r!   c                     g | ]
}|d          S r   r    .0r   s     r"   
<listcomp>rM         FFF!FFFr!   rT   c                     g | ]
}|d          S rJ  r    rK  s     r"   rM  rM  !  rN  r!   rE  r{   )r.   )Nr    NNr'   )r    NN)NNrB   )r    NNr'   )ur   r>  r2  textwrapr   rF  r   astropyr   r   astropy.utils.exceptionsr   __all__ConfigNamespacer   r   r-   r:   r	   r
   r   r   r   compiler_   r   r   SyntaxWarningr   r   r   RuntimeWarningr   re   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   FutureWarningr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rN   r   r   r   r   r   r   r   r   r  r  r  r  r	  r  r  r  r  r  r  r  r  r  r  r   r"  r$  r&  r(  r*  r,  r.  r9  rH  rp   extendr    r!   r"   <module>rZ     s   @ 
			 				             % % % % % % 3 3 3 3 3 3  &	 	 	 	 	7" 	 	 	 tvv> > > >
1 
1 
1 
1 UVM M M M(- - - -   $H H H H ?AQ R R R R rz0 ' ' 'T$ $ $ $ $ $ $ $B    9m       M       9m       	>       y*   B B B B B
 B B B0    
   <3 3 3 3 3
 3 3 3l    
   "    
   ( ( ( ( (
 ( ( ((    
   *	 	 	 	 	
 	 	 	6 6 6 6 6
 6 6 6"    
   &Q Q Q Q Q
 Q Q Q(    
   *    
   @    
   *    
   &    
   $
 
 
 
 

 
 
 
    
   
 
 
 
 

 
 
 
Y Y Y Y Y
 Y Y Y	 	 	 	 	) 	 	 	
 
 
 
 
)] 
 
 
& & & & &) & & &	. 	. 	. 	. 	.
 	. 	. 	.
: 
: 
: 
: 
:
 
: 
: 
:	3 	3 	3 	3 	3
 	3 	3 	3    
       
    W W W W W
 W W W         
      2         
           
       
       
       
       
   6 6 6 6 6
 6 6 6
9 
9 
9 
9 
9
 
9 
9 
9    
   ,
4 
4 
4 
4 
4
 
4 
4 
4
$ 
$ 
$ 
$ 
$
 
$ 
$ 
$         
      &    )Z   0, , , , ,
 , , ,> > > > >
 > > >, , , , ,
 , , ,	@ 	@ 	@ 	@ 	@
 	@ 	@ 	@    
   " " " " "
 " " "
 
 
 
 

 
 
 
    
   
 
 
 
 

 
 
 

 
 
 
 

 
 
 
. . . . .)Z . . .0
 
 
 
 
)Z 
 
 

 
 
 
 
)Z 
 
 

 
 
 
 
)Z 
 
 
    )Z   ,    )Z   J    )Z       )Z       )Z       )Z   ,    )Z    ( ( ( ( ()Z ( ( (V
L 
L 
L 
L 
L)Z 
L 
L 
L	J 	J 	J 	J 	J)Z 	J 	J 	J    
    
; 
; 
; 
; 
;)Z 
; 
; 
;    )Z   > > > > >)Z > > >    
       )Z   K K K K K)Z K K K    
   	 	 	 	 	)Z 	 	 	N N N N N
 N N N  < < <: gn33002233G FF@@EEFFF G G G FF@@EEFFF G G G G Gr!   