Error with op4 reading for big matrices

36 views
Skip to first unread message

Fabiola Cavaliere

unread,
Jan 11, 2023, 9:44:42 AM1/11/23
to pyNastran dev
Hello,

I am trying to use pyNastran to read an op4 containing big matrices and I get the following error:

"in _read_matrix_ascii
    ncols, nrows, form, matrix_type = line[0:32].split()
ValueError: not enough values to unpack (expected 4, got 3)"

This is due to the fact that the line contains the following string:
line = ' 9552018-9552018       6       1KAA     1P,3E22.15'

As a consequence, the algorithm is not able to split correctly nrows and ncols, and gives back the following:

['9552018-9552018', '6', '1KAA']

instead of:
['9552018', '-9552018', '6', '1KAA']

Could that be fixed?

Thanks,
Fabiola Cavaliere





Reply all
Reply to author
Forward
0 new messages