Skip to content

read_griddata_ascii() passes raw bytes to _stripcomment() in Python 3 #85

Closed
@bcfriesen

Description

@bcfriesen

When downloading some supernova models, e.g., 'nugent-sn1a' (but not all, e.g., 'hsiao'), read_griddata_ascii() is invoked. This function passes each line of an ASCII file to _stripcomment(). However in Python 3 the line object is interpreted as raw bytes, while in Python 2 it is a string, which is what _stripcomment() expects. As a result, Python 3 throws the TypeError "Type str doesn't support the buffer API".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      read_griddata_ascii() passes raw bytes to _stripcomment() in Python 3 · Issue #85 · sncosmo/sncosmo