IDAES / examples

IDAES platform examples and tutorials
https://idaes-examples.readthedocs.io
Other
14 stars 34 forks source link

tutorial bug FlowsheetBlock #118

Closed ian-moskowitz closed 1 month ago

ian-moskowitz commented 1 month ago

I was attempting to follow along with the tutorial from: https://idaes-examples.readthedocs.io/en/latest/docs/tut/core/flash_unit_doc.html

I had executed the first cell:

from pyomo.environ import ConcreteModel, SolverFactory, Constraint, value
from idaes.core import FlowsheetBlock

# Import idaes logger to set output levels
import idaes.logger as idaeslog

but upon executing the second cell:

m = ConcreteModel()
m.fs = FlowsheetBlock(dynamic=False)

an error is raised:

TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
andrewlee94 commented 1 month ago

@ian-moskowitz This error is due to a mismatch in Pyomo and IDAES versions. Pyomo's latest release (earlier this month) made some changes that unfortunately give rise to this error, which will be fixed in the upcoming IDAES release (hopefully in the next few weeks). Unfortunately, you happened to install during the window whilst we were still addressing this issue.

For now, you can should either:

  1. Use the previous release of Pyomo with the most recent version of IDAES, or
  2. Use the latest development versions of IDAES with either the latest Pyomo release or their developement branch.
ian-moskowitz commented 1 month ago

@andrewlee94 - I super appreciate the very quick reply 🙏!

if possible, could you please recommend a version of Pyomo that's compatible with the most recent version of IDAES?

andrewlee94 commented 1 month ago

Pyomo version 6.7.1 is the last version that is compatible with the current IDAES release.

ian-moskowitz commented 1 month ago

thank you!! 😎