Skip to content

Improved error message if number of entries in rows are inconsistent #577

@lovkush-shell

Description

@lovkush-shell

Is your feature request related to a problem? Please describe.

If there are an inconsistent number of entries in different rows, the error message is unhelpful.

Here is example las file where first row incorrectly has two entries:

~Curve Information Block
#MNEM.UNIT                                                                                                                 
D 00:     1  DEPTH
C 01:     2  Caliper
DEN 01:     3  Bulk Density                                                                                                             
~ASCII
 1 0
 2 0 0

The error message I get from Lasio is:

ValueError: Cannot reshape ~A data size (5,) into 3 columns

Describe the solution you'd like
A more helpful error message. Something like "Data in the las file have inconsistent number of entries, e.g. Line 7 has 2 entries '1 0' and Line 8 has 3 entries '2 0 0'

Describe alternatives you've considered
None

Additional context
NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions