Skip to content
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

int is not a valid ecsv datatype #484

Closed
rrjbca opened this issue Sep 1, 2021 · 0 comments · Fixed by #485
Closed

int is not a valid ecsv datatype #484

rrjbca opened this issue Sep 1, 2021 · 0 comments · Fixed by #485
Assignees
Labels
bug Something isn't working examples

Comments

@rrjbca
Copy link
Contributor

rrjbca commented Sep 1, 2021

Description
In the ECSV table format definition int is not listed as a valid datatype. In the SkyPy file examples/galaxies/sdss_dered_10deg2.ecsv int is currently used as the datatype for some columns. Since astropy 4.3 the datatype field is explicitly chacked against a list of allowed values when reading an ecsv file. This causes our documentation builds to fail.

To Reproduce

  1. install astropy 4.3 (and speclite develop branch; see Speclite 0.13 incompatible with Astropy 4.3.x #482)
  2. git clone https://github.com/skypy/skypy.git
  3. cd skypy/docs
  4. make html
examples/galaxies/plot_photometry.py failed leaving traceback:
Traceback (most recent call last):
  File "examples/galaxies/plot_photometry.py", line 69, in <module>
    sdss_data = Table.read("sdss_dered_10deg2.ecsv", format='ascii.ecsv')
  File "astropy/table/connect.py", line 61, in __call__
    out = registry.read(cls, *args, **kwargs)
  File "astropy/io/registry.py", line 527, in read
    data = reader(*args, **kwargs)
  File "astropy/io/ascii/connect.py", line 18, in io_read
    return read(filename, **kwargs)
  File "astropy/io/ascii/ui.py", line 369, in read
    dat = reader.read(table)
  File "astropy/io/ascii/core.py", line 1338, in read
    self.header.get_cols(self.lines)
  File "astropy/io/ascii/ecsv.py", line 186, in get_cols
    raise ValueError(f'datatype {col.dtype!r} of column {col.name!r} '
ValueError: datatype 'int' of column 'dered_u' is not in allowed values ('bool', 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64', 'float16', 'float32', 'float64', 'float128', 'string')
@rrjbca rrjbca added bug Something isn't working examples labels Sep 1, 2021
@rrjbca rrjbca self-assigned this Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working examples
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant