Skip to content

data.py throwing error #2

@danlaine

Description

@danlaine

I am trying to read in data using data.py but an exception is being raised.

Commands I'm running:
python3
(Now in the Python terminal)
>>> import data
>>> d = data.Data()
>>> d.raw.read("Original_Dataset_1-1/Original_Dataset_Offline_Edition_1/Network_01-10/scenario_1/case.raw")

I get the following stack printout:

missing field, row:
['2', '1', '1', '1', '1', '27.292', '7.278', '0', '0', '0', '0', '1', '1']
Traceback (most recent call last):
File ".../Evaluation/data.py", line 42, in pad_row
raise Exception('missing field not allowed')
Exception: missing field not allowed
Traceback (most recent call last):
File "", line 1, in
File ".../Evaluation/data.py", line 147, in read
self.read_from_rows(rows)
File ".../Evaluation/data.py", line 190, in read_from_rows
load.read_from_row(row)
File ".../Evaluation/data.py", line 892, in read_from_row
row = pad_row(row, 14)
File ".../Evaluation/data.py", line 52, in pad_row
raise e
File "/.../Evaluation/data.py", line 42, in pad_row
raise Exception('missing field not allowed')
Exception: missing field not allowed

If I'm invoking this wrong, please provide example usage.

Cheers,
Dan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions