You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
astropy.io.ascii.read - segmentation fault when using names #3545
Hi
I'm trying to run some code which worked on a previous astropy version but now won't work
I'm running astropy 1.0 on python 2.6.6
I'm trying to read a 3 line file and I get a Segmentation Fault.
This ONLY occurs it seems when I use the names keyword.
If anyone has any ideas to fix it would be appreciated.
It seems a major problem :/
I can't use the autoread of the header because the header has a '#' prefix which confuses the allaignment.
I'm going to try and rollback or fudge it
If I use 'tab' i get stupid headers :/ because they are misaligned, i didn't make them.
Line 1 shows i can add each header in by hand but that will be a lot of rehashing because I use this in a few scripts.
The file is http://www.astro.ljmu.ac.uk/~mab/assets/catalog.csv
dat = ascii.read('catalog.csv', delimiter='\t')
dat = Table.read('catalog.csv', format='ascii', delimiter='\t')
There is a subtle difference between format='tab' and delimiter='\t', namely that the former does not strip leading/trailing whitespace, while the latter does. In your case you need that leading \t stripped.
Activity
martynbristow commentedon Feb 24, 2015
If anyone has any ideas to fix it would be appreciated.
It seems a major problem :/
I can't use the autoread of the header because the header has a '#' prefix which confuses the allaignment.
I'm going to try and rollback or fudge it
astrofrog commentedon Feb 24, 2015
@martynbristow - what happens if you do simply
format='tab'instead offast_tab?cc @taldcroft @mdmueller
mdboom commentedon Feb 24, 2015
Can you provide the file (or just enough of the file) so I can try to reproduce?
martynbristow commentedon Feb 24, 2015
If I use 'tab' i get stupid headers :/ because they are misaligned, i didn't make them.
Line 1 shows i can add each header in by hand but that will be a lot of rehashing because I use this in a few scripts.
The file is http://www.astro.ljmu.ac.uk/~mab/assets/catalog.csv
Fix astropy#3545: Segfault when column header is skipped
mdboom commentedon Feb 24, 2015
@martynbristow: Can you try #3546 to see if it addresses your original issue?
taldcroft commentedon Feb 24, 2015
@martynbristow - try this:
There is a subtle difference between
format='tab'anddelimiter='\t', namely that the former does not strip leading/trailing whitespace, while the latter does. In your case you need that leading\tstripped.Fix astropy#3545: Segfault when column header is skipped
Fix astropy#3545: Segfault when column header is skipped