Table.read segfaults on CSV file with missing comma in header
See original GitHub issueFor this CSV
file with a missing trailing comma in the header line
aaa,bbb
1,2,
3,4,
I’m getting a segfault from Table.read
:
$ python -c 'from astropy.table import Table; Table.read("test.csv")'
Segmentation fault: 11
This is with Python 3.5.2, Numpy 1.11.1 and Astropy 1.2 from Macports on latest Mac OS X.
Here’s the crash report: https://gist.github.com/cdeil/164d4d5ee14b49598e0454873ff0ea04#file-gistfile1-txt-L34
1 cparser.cpython-35m-darwin.so 0x0000000111448763 __pyx_pw_7astropy_2io_5ascii_7cparser_7CParser_9read + 1219
@mdmueller, @taldcroft or anyone familiar with the astropy.io.ascii cparser: can you reproduce or do you need more info?
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Column names out by one after read.csv (cause is trailing ...
The column headers are out by one. When I remove the commas in the second and third lines, i.e. import this file: "Sl.no", ......
Read more >Intermittent segfaults with ascii loader · Issue #3691
The segfault occurs when attempting to read a big CSV file with the HTML reader (via libxml) during the guessing process. Maybe I'm...
Read more >Solved: Display XY Data Will Not Show Table Headers
Attempting to Display XY Data shows field numbers and no table headers. I tried to export the csv table into a .dbf, but...
Read more >Extract Rows from Excel CSV (No Table)
Hi all, I have a series of CSV files stored in a location in SharePoint — that have a title row (to ignore)...
Read more >Handling Messy CSV Files
There's a very simple reason for this problem: a “comma separated value” file is not a standard file format, but is actually more...
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 Free
Top 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
Having a quick look to it, now that I know a bit the tokenizer code, it should be easy to fix. I will open a PR later.
#5219 is a duplicate of this and I’ve closed it.