Conceptual Models > Incorporation PHREEQC in programming languages

PHREEQpy in unix

(1/4) > >>

Dear PHREEQCusers,

I am developing ROSSpy ( as an application of PHREEQpy for simulating the geochemical reactive transport of reverse osmosis desalination. ROSSpy executes flawlessly in windows, however, the package yields an error that the database cannot load in unix systems ( This error occurs despite parameterizing DATABASE as the first line of the PQI file ( and despite providing the database as an argument to the imported PHREEQpy object (

The PHREEQpy object is also differentially defined based upon the operating system (, which suggests that the PHREEQpy object should behave identically in both operating sysytems. What could be the source of this error with different operating systems? How can it be resolved?

I am optimistic that some of you may be able to help clarify and resolve the issue. I can elaborate any details of the error or the corresponding code at anyone's request.

Thank you for your support :)

The DATABASE keyword is disabled for input files in Linux. Here is what my guru says:

I think he needs to make sure the call to phreeqc.load_database() see line 720:

is called with the correct path of the pitzer database.  He mentions in the post that the PQI file is using the DATABASE keyword but iphreeqc ignores it, it requires the DB to be loaded using LoadDatabase or in phreeqpy's case load_database().

Dear David,

I printed the path in the Notebook ( and verified that database path

--- Code: ---/Users/Andrew/Documents/Research/University of Victoria Civil Engineering/ROSSpy/rosspy/databases/pitzer.dat
--- End code ---
is correct via the "Go" function of the Finder, which accepts a path and leads to that location. The acceptance of the path by "Go" suggests that the syntax of the path is correct, although, perhaps some syntactic detail is implicitly understood by Mac OS yet might not be sufficient for PHREEQpy?

I appreciate your guidance :)

Try a quoted string "/users/..." instead of a variable. And do an ls from Python with the same string just to make sure Python can see the file. If it works, you can modify as necessary.

I hard-coded the path to the load_database() function and received the same error. What is the syntax for "Is from Python"?


[0] Message Index

[#] Next page

Go to full version