Migration status

Although the new site is live, work is still in progress to improve it.

Known issues:

  1. Forums: The organization of (sub-)categories and threads is disrupted. Please use the search box inside the "Message boards" to navigate.

Message Boards

.ini files

KG
Kristina Gumgowski, modified 23 Days ago.

.ini files

Youngling Posts: 8 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
KG
Kristina Gumgowski, modified 23 Days ago.

RE: .ini files

Youngling Posts: 8 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 23 Days ago.

RE: .ini files

Jedi Knight Posts: 114 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
KG
Kristina Gumgowski, modified 23 Days ago.

RE: .ini files

Youngling Posts: 8 Join Date: 3/18/21 Recent Posts
It works, thanks a lot! emoticon