writing a basic ascii table from QTable is broken
See original GitHub issuefrom astropy.table import QTable,Column
import astropy.units as u
q = QTable()
q['dt'] = [1,2,3]*u.s
q.write('foo.txt',format='ascii.no_header',delimiter=',',formats={'dt':'%.18f'})
The write call throws an exception with “Quantity object has no name member”
If I look in _set_col_formats
in io/ascii/core.py
it says
if col.info.name in self.formats:
col.info.format = self.formats[col.name]
That second line probably should say “col.info.name” instead. A similar change would need to be made in the fast writer
EDIT: Syntax highlighting
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Table Operations — Astropy v5.2
Aggregation is the process of applying a specified reduction function to the values within each group for each non-key column. This function must...
Read more >qt showing non-latin special characters in QTableWidgetItem
I am attempting to show some chess pieces in a QTableWidget through a QTableWidgetItem but when i do i do not get the...
Read more >QTableWidget Class | Qt Widgets 6.4.1
Sets the given widget to be displayed in the cell in the given row and column, passing the ownership of the widget to...
Read more >Create an ASCII art table from tabular data
I've tried troff -based solutions and while the simple demos have worked, feeding the command actual input has resulted in bizarre errors. I've ......
Read more >libjpeg.doc - Apple Open Source
The file example.c provides heavily commented skeleton code for calling the JPEG library. Also see jpeglib.h (the include file to be used by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can also probably make a quick fix if @mcbeth does not have time.
On Thu, May 09, 2019 at 07:21:56AM -0700, P. L. Lim wrote:
Yes, that exact code worked on 1.2.4
Jeff
– “The man who does not read good books has no advantage over the man who cannot read them.” – not Mark Twain, maybe a southen librarian in 1910