Skip to content

astropy.io.ascii.read - segmentation fault when using names #3545

Closed

Description

@martynbristow

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.

dump

Activity

  1. martynbristow commented on Feb 24, 2015

    @martynbristow
    Author

    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

  2. astrofrog commented on Feb 24, 2015

    @astrofrog
    Member

    @martynbristow - what happens if you do simply format='tab' instead of fast_tab?

    cc @taldcroft @mdmueller

  3. mdboom commented on Feb 24, 2015

    @mdboom
    Contributor

    Can you provide the file (or just enough of the file) so I can try to reproduce?

  4. martynbristow commented on Feb 24, 2015

    @martynbristow
    Author

    dump

    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

  5. self-assigned this
    on Feb 24, 2015
  6. added this to the v1.0.1 milestone on Feb 24, 2015
  7. added a commit that references this issue on Feb 24, 2015
    8e62f8d
  8. mdboom commented on Feb 24, 2015

    @mdboom
    Contributor

    @martynbristow: Can you try #3546 to see if it addresses your original issue?

  9. taldcroft commented on Feb 24, 2015

    @taldcroft
    Member

    @martynbristow - try this:

    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.

  10. added a commit that references this issue on Mar 4, 2015
    bb987b0
  11. added a commit that references this issue on Mar 6, 2015
    3673c21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions