QSD-Group / QSDsan

Quantitative Sustainable Design (QSD) of sanitation and resource recovery systems.
https://qsdsan.com
Other
30 stars 14 forks source link

TypeError in create_MODEL_cmps: CompiledChemicals._compile() takes 2 positional arguments but 3 were given #123

Closed pengxiao01 closed 1 month ago

pengxiao01 commented 1 month ago

Describe the problem While trying to create state variables for MODEL (e.g., ADM1/ASM2D) using create_madm1_cmps(), I encountered a TypeError. It seems that CompiledChemicals._compile() is being called with 3 positional arguments, but the method only accepts 2. Below is the relevant code and error traceback:

To Reproduce

  1. Import processes from qsdsan: from qsdsan import processes as pc cmps = pc.create_madm1_cmps() # create state variables for ADM1 cmps.show()
  2. Run the script.

Screenshots If applicable, add screenshots to help explain your problem. Screenshot 2024-09-30 at 11 08 08

Environment (please complete the following information):

  1. Versions of the following packages:

    • QSDsan 1.3.1
    • EXPOsan (if applicable)
    • BioSTEAM 2.46.1

    If you are using pip-installed ones, you can get the info by pip show <PACKAGE_NAME> (e.g., pip show qsdsan).

    If you have cloned any of the following packages, please make sure your local and remote are in sync (either pull remote changes to local or push local changes to remote), then include links or point to the branches/forks you are using.

  2. Operating systems and version [e.g. macOS 12.1, Windows 11] Linux (Google Colab)

Additional context Add any other context about the problem here.

joyxyz1994 commented 1 month ago

Hi @pengxiao01, thanks for notifying us the issue.

The modified ADM1 related features aren't available in the pip-installed version of QSDsan yet. We're working on a new release. In the meantime, please use the dev branch of the Github version of QSDsan to access those feature. If you're also using EXPOsan, the bsm2 branch is the compatible version.

yalinli2 commented 1 month ago

This is actually due to a recent update in BioSTEAM, @pengxiao01 you probably installed the pip version of BioSTEAM (or pulled the master branch instead of the qsdsan branch). It should be fixed now if you update your env.