You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there is still some error from the OPM FLOW REFERENCE manual for the Python code part.
In the part of APPENDIX D: PYTHON INTERFACE TO OPM FLOW, one example is as follow:
kw=deck["WELSPECS"]
print(f"Keyword has {len(kw)} records")
forrecordinkw:
well=record["WELL"].get_str()
group=record[1].get_str()
print(f"Well {num}: {well} is part of group{group})
After I load a new deck to this code, the main error occurs on this code: well = record["WELL"].get_str()
The error is:
well = record["WELL"].get_str()
**TypeError: __getitem__(): incompatible function arguments. The following argument types are supported:
1. (self: opm.opmcommon_python.DeckRecord, arg0: int) -> Opm::DeckItem**
Which means I cannot use the keyword index to get the values,only can use the int number. Also there is other example in the manual using the same kind of code.
Is this because the latest python library really doesn't support keyword indexing now, or do I need to use some other method?
The text was updated successfully, but these errors were encountered:
Hi there is still some error from the OPM FLOW REFERENCE manual for the Python code part.
In the part of APPENDIX D: PYTHON INTERFACE TO OPM FLOW, one example is as follow:
After I load a new deck to this code, the main error occurs on this code:
well = record["WELL"].get_str()
The error is:
Which means I cannot use the keyword index to get the values,only can use the int number. Also there is other example in the manual using the same kind of code.
Is this because the latest python library really doesn't support keyword indexing now, or do I need to use some other method?
The text was updated successfully, but these errors were encountered: