SteveDoyle2 / pyNastran

A Python-based interface tool for Nastran's file formats
Other
393 stars 154 forks source link

Assertion Error on missing word in FLOAT_PARAMS_1 #701

Closed tk-90-github closed 2 years ago

tk-90-github commented 2 years ago

When reading an op2-file I get the following assertion error. It's just on some files.

Setup: Python Version 3.10.5 64-bit pynastran==1.3.4 Windows 10

Error message:


failed reading b'PVT0' isubtable=-3
op2.py:1296 

1296 model.read_op2(op2_filename=op2_filename, build_dataframe=build_dataframe,
1297                skip_undefined_matrices=skip_undefined_matrices, combine=combine,
1298                encoding=encoding)

op2_scalar.py:1510     assert word in FLOAT_PARAMS_1, f'float/str; word={word} value={value}'

AssertionError: word=b'AUTOMSET'

Seems like this key isn't listed yet in the Constant container.

Edit: The error occures when invocing the read_op2() either from the class OP2().read_open2() or the function read_op2 directly

SteveDoyle2 commented 2 years ago

Do you have a small example? From the name, my guess is it's not a float.

tk-90-github commented 2 years ago

Unfortunately, I can't provide a small version of it.

Edit: Found following link/ description to AUTOMSET which is quite new, so amybe this param is not yet supported Link to MSC nastran AUTOMSET

SteveDoyle2 commented 2 years ago

There's nothing I can do without an example. I no longer have access to MSC Nastran, so I can't make an example.

It doesn't need to be a realistic example. It just needs to create the error.

SteveDoyle2 commented 2 years ago

Reopen if there's an example.

tk-90-github commented 2 years ago

I'm on it to get a simple test file

tk-90-github commented 2 years ago

Assembly_group_with_AUTOMSET.zip @SteveDoyle2 Here are two files in the zip for testing the issue I mentioned earlier. I created a fork of pynastran and now pynastran is importing those files: Fork Im not sure if its just a workaround or truly solves the issue.

Can you reopen this issue?

SteveDoyle2 commented 2 years ago

That's a huge model and it's all just grids and tets. PyNastran is too big as is at 160 MB and that's 35 MB for one example.

I don't know what triggers the AUTOMSET, but you can probably do it with 10 nodes. Results do not need to be physical at all.

On Tue, Aug 16, 2022 at 1:58 AM tk-90-github @.***> wrote:

Assembly_group_with_AUTOMSET.zip https://github.com/SteveDoyle2/pyNastran/files/9349230/Assembly_group_with_AUTOMSET.zip @SteveDoyle2 https://github.com/SteveDoyle2 Here are two files in the zip for testing the issue I mentioned earlier. I created a fork of pynastran and now pynastran is importing those files: Fork https://github.com/tk-90-github/pyNastran Im not sure if its just a workaround or truly solves the issue.

Can you reopen this issue?

— Reply to this email directly, view it on GitHub https://github.com/SteveDoyle2/pyNastran/issues/701#issuecomment-1216342379, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICUWL4YH6I5JPOWOWNN23VZNJ4BANCNFSM52VMM3OA . You are receiving this because you were mentioned.Message ID: @.***>