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
Describe the bug
I am playing with the options of the MAW package and I was trying to set the SHUT_OFF option. Every time I run my script with this option I get the error message below. I I run the script using the keyword SHUTOFF the script for creating the packages works fine, but I get an error if I try to run the model. To make the model run I have to manually open the MAW package and replace SHUTOFF with SHUT_OFF. I think there is a bug with the keys of some dictionaries in the flopy modules.
Traceback (most recent call last):
File "H:\scripts\XXXX\test_injection_dummy_model.py", line 130, in <module>
sim.write_simulation()
File "C:\Program Files\Python39\lib\site-packages\flopy\mf6\modflow\mfsimulation.py", line 1589, in write_simulation
model.write(ext_file_action=ext_file_action)
File "C:\Program Files\Python39\lib\site-packages\flopy\mf6\mfmodel.py", line 1143, in write
pp.write(ext_file_action=ext_file_action)
File "C:\Program Files\Python39\lib\site-packages\flopy\mf6\mfpackage.py", line 2690, in write
self._write_blocks(fd, ext_file_action)
File "C:\Program Files\Python39\lib\site-packages\flopy\mf6\mfpackage.py", line 2853, in _write_blocks
block.write(fd, ext_file_action=ext_file_action)
File "C:\Program Files\Python39\lib\site-packages\flopy\mf6\mfpackage.py", line 1236, in write
self._write_block(fd, block_header, ext_file_action)
File "C:\Program Files\Python39\lib\site-packages\flopy\mf6\mfpackage.py", line 1374, in _write_block
output = dataset.get_file_entry(
File "C:\Program Files\Python39\lib\site-packages\flopy\mf6\data\mfdatalist.py", line 1788, in get_file_entry
return super().get_file_entry(ext_file_action=ext_file_action)
File "C:\Program Files\Python39\lib\site-packages\flopy\mf6\data\mfdatalist.py", line 712, in get_file_entry
return self._get_file_entry(ext_file_action)
File "C:\Program Files\Python39\lib\site-packages\flopy\mf6\data\mfdatalist.py", line 810, in _get_file_entry
self._get_file_entry_record(
File "C:\Program Files\Python39\lib\site-packages\flopy\mf6\data\mfdatalist.py", line 1036, in _get_file_entry_record
keystr_struct = data_item.keystring_dict[
KeyError: 'shut_offrecord'
@giovannifi, I just committed a fix to develop. Please use the latest flopy code from the develop branch and confirm that it fixes this problem for you.
Describe the bug
I am playing with the options of the MAW package and I was trying to set the SHUT_OFF option. Every time I run my script with this option I get the error message below. I I run the script using the keyword SHUTOFF the script for creating the packages works fine, but I get an error if I try to run the model. To make the model run I have to manually open the MAW package and replace SHUTOFF with SHUT_OFF. I think there is a bug with the keys of some dictionaries in the flopy modules.
you can try this script to reproduce the problem:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the script to create the MAW package including the keword SHUT_OFF
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: