.ini files - Forum - iMOD
iMOD Forum
.ini files
Kristina Gumgowski, modified 3 Years ago.
.ini files
Youngling Posts: 13 Join Date: 3/18/21 Recent Posts
Hi everyone,
I am creating my first .ini file and receive the attached error message. However, the keyword "Function" is present in the file i created:
FUNCTION=XYZTOIDF
XYZFILE=C:/Users/Kristina/Documents/2021-15-04/mydata.dat
IPFFILE=C:/Users/Kristina/Documents/2021-15-04/mydata.ipf
IXCOL= 1
IYCOL= 2
IZCOL= 5
CS= 50.0
IDFFILE=C:/Users/Kristina/Documents/2021-15-04/mydata.idf
GRIDFUNC=Max
What did I miss in creating the ini-file? I am creating the files using a python script. I am not very experienced with python but since I get the error message from iMod the system call seems to be correct.
I am happy for any kind of help!
all the best
Kristina
I am creating my first .ini file and receive the attached error message. However, the keyword "Function" is present in the file i created:
FUNCTION=XYZTOIDF
XYZFILE=C:/Users/Kristina/Documents/2021-15-04/mydata.dat
IPFFILE=C:/Users/Kristina/Documents/2021-15-04/mydata.ipf
IXCOL= 1
IYCOL= 2
IZCOL= 5
CS= 50.0
IDFFILE=C:/Users/Kristina/Documents/2021-15-04/mydata.idf
GRIDFUNC=Max
What did I miss in creating the ini-file? I am creating the files using a python script. I am not very experienced with python but since I get the error message from iMod the system call seems to be correct.
all the best
Kristina
Attachments:
Kristina Gumgowski, modified 3 Years ago.
RE: .ini files
Youngling Posts: 13 Join Date: 3/18/21 Recent Posts
I also tried to change the filename to "xyztoidf.ini" and corrected forward to backward slashes. Same error message occurs
Frans Roelofsen, modified 3 Years ago.
RE: .ini files
Padawan Posts: 51 Join Date: 11/11/13 Recent Posts
Hi Kristina,
Your python script looks OK. I copied the script and tried to make and run a batch function myself. The content of the ini file looks OK but the same error appeared on my screen. Then I tried to delete the INI file in order to do it in another way. But I could not delete the INI file. Windows opened a window telling me that the file is still open in Python. Therefor I looked closely to the script and found that your closing statement was not complete.
It must be ini_file.close()
So iMOD is not able to read a text file that is still open in another program, like python.
I think this is the solution. Please let me know.
Kind regards,
Frans
Your python script looks OK. I copied the script and tried to make and run a batch function myself. The content of the ini file looks OK but the same error appeared on my screen. Then I tried to delete the INI file in order to do it in another way. But I could not delete the INI file. Windows opened a window telling me that the file is still open in Python. Therefor I looked closely to the script and found that your closing statement was not complete.
It must be ini_file.close()
So iMOD is not able to read a text file that is still open in another program, like python.
I think this is the solution. Please let me know.
Kind regards,
Frans
Kristina Gumgowski, modified 3 Years ago.
RE: .ini files
Youngling Posts: 13 Join Date: 3/18/21 Recent Posts
It works, thanks a lot!
