Conceptual Models > Incorporation PHREEQC in programming languages

Batch PHREEQC via Python script



I am developing a command-line UI for ROSSpy ( via the PHREEQC.bat file. I continually receive the attached error message that "The system cannot find the path specified". This cannot be true, since the paths are verified to exist in the system in the Python lines ( just preceeding the execution of the batch file (

What is the source of this error, and how can it be resolved?

I don't know. Perhaps the line is too long?

The phreeqc.bat file usually says "input file not found" or "database file not found", so I am not sure where the message "the system cannot find" comes from. It is not in the code for phreeqc.

Try putting all the files in one directory (.bat, input, database), cd to that directory, and run the bat file (phreeqc.bat input output database).

Hello David,

We elected to circumvent this bug from calling the batch PHREEQC software by simply using PHREEQpy. This disadvantageously does neither generates a full PQO report nor displays updates as the PQI file is executed, but it is sufficient for the simple results. I may revisit this concept is future versions of ROSSpy.

Thank you :)

Hope it's not too late to comment on that. I've been using phreeqpy to automate some calculations and I use the function set_output_file_on to get the results just like the PQO report. By default it saves the file at the running directory with an extension .out (ex. phreeqc.0.out). You can change the file name using standard python module os.rename().

--- Code: ---import phreeqpy.iphreeqc.phreeqc_dll as phreeqc_mod
phreeqc = phreeqc_mod.IPhreeqc()

--- End code ---


[0] Message Index

Go to full version