Replies: 1 comment 3 replies
-
Hi @michnoffn, thanks for bringing this up. Assuming the script you're referring to is this one, it looks like that script is very outdated (it was last modified 4 years ago), and therefore it's causing errors when it is run with a recent version of IDAES. Therefore, I'd say it's safe to disregard the errors as they are due to the script itself being out-of-date. I've just opened #1102 as an internal reminder to review and remove possibly outdated scripts still left in this repository to avoid confusing users going forward. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just ran the "notebook_test_script.py" in the Jupyter Notebook and got the following output:
Pyomo Import Checks: Passed
IDAES Import Checks: FAILED
Solver Availability Check: Passed
2023-02-22 17:11:04 [ERROR] idaes.core.base.process_block: Failure in build: fs
Traceback (most recent call last):
File "C:\Users\nmich\LabPrograms\miniconda3\envs\idaes\lib\site-packages\idaes\core\base\process_block.py", line 39, in _rule_default
b.build()
File "C:\Users\nmich\LabPrograms\miniconda3\envs\idaes\lib\site-packages\idaes\core\base\flowsheet_model.py", line 145, in build
super(FlowsheetBlockData, self).build()
File "C:\Users\nmich\LabPrograms\miniconda3\envs\idaes\lib\site-packages\idaes\core\base\process_base.py", line 116, in build
self._get_config_args()
File "C:\Users\nmich\LabPrograms\miniconda3\envs\idaes\lib\site-packages\idaes\core\base\process_base.py", line 161, in _get_config_args
self.config = self.CONFIG(kwargs)
File "C:\Users\nmich\LabPrograms\miniconda3\envs\idaes\lib\site-packages\pyomo\common\config.py", line 1353, in call
ans.set_value(value)
File "C:\Users\nmich\LabPrograms\miniconda3\envs\idaes\lib\site-packages\pyomo\common\config.py", line 2307, in set_value
raise ValueError(
ValueError: key 'default' not defined for ConfigDict '' and implicit (undefined) keys are not allowed
ERROR: Constructing component 'fs' from data=None failed: ValueError: key
'default' not defined for ConfigDict '' and implicit (undefined) keys are
not allowed
ValueError Traceback (most recent call last)
~\LabPrograms\examples\Tutorials\Basics\notebook_test_script.py in
58 m = ConcreteModel()
59
---> 60 m.fs = FlowsheetBlock(default={"dynamic": False})
61
62 m.fs.v = Var(m.fs.time)
~\LabPrograms\miniconda3\envs\idaes\lib\site-packages\pyomo\core\base\block.py in setattr(self, name, val)
647 # Pyomo components are added with the add_component method.
648 #
--> 649 self.add_component(name, val)
650 else:
651 #
~\LabPrograms\miniconda3\envs\idaes\lib\site-packages\pyomo\core\base\block.py in add_component(self, name, val)
1217 _blockName, str(data))
1218 try:
-> 1219 val.construct(data)
1220 except:
1221 err = sys.exc_info()[1]
~\LabPrograms\miniconda3\envs\idaes\lib\site-packages\pyomo\core\base\block.py in construct(self, data)
2207 obj.construct(data.get(name, None))
2208 # Trigger the (normal) initialization of the block
-> 2209 self._getitem_when_not_present(_idx)
2210 finally:
2211 # We must allow that id(self) may no longer be in
~\LabPrograms\miniconda3\envs\idaes\lib\site-packages\pyomo\core\base\block.py in _getitem_when_not_present(self, idx)
2132
2133 try:
-> 2134 obj = self._rule(_block, idx)
2135 # If the user returns a block, transfer over everything
2136 # they defined into the empty one we created. We do
~\LabPrograms\miniconda3\envs\idaes\lib\site-packages\pyomo\core\base\initializer.py in call(self, parent, idx)
302 return self._fcn(parent, *idx)
303 else:
--> 304 return self._fcn(parent, idx)
305
306
~\LabPrograms\miniconda3\envs\idaes\lib\site-packages\idaes\core\base\process_block.py in _rule_default(b, *args)
37 """
38 try:
---> 39 b.build()
40 except Exception:
41 logging.getLogger(name).exception("Failure in build: {}".format(b))
~\LabPrograms\miniconda3\envs\idaes\lib\site-packages\idaes\core\base\flowsheet_model.py in build(self)
143 None
144 """
--> 145 super(FlowsheetBlockData, self).build()
146
147 self._time_units = None
~\LabPrograms\miniconda3\envs\idaes\lib\site-packages\idaes\core\base\process_base.py in build(self)
114 None
115 """
--> 116 self._get_config_args()
117
118 def flowsheet(self):
~\LabPrograms\miniconda3\envs\idaes\lib\site-packages\idaes\core\base\process_base.py in _get_config_args(self)
159 else:
160 kwargs = self.parent_component()._block_data_config_default
--> 161 self.config = self.CONFIG(kwargs)
162
163 def fix_initial_conditions(self, state="steady-state"):
~\LabPrograms\miniconda3\envs\idaes\lib\site-packages\pyomo\common\config.py in call(self, value, default, domain, description, doc, visibility, implicit, implicit_domain, preserve_implicit)
1351 # ... and set the value, if appropriate
1352 if value is not NOTSET:
-> 1353 ans.set_value(value)
1354 return ans
1355
~\LabPrograms\miniconda3\envs\idaes\lib\site-packages\pyomo\common\config.py in set_value(self, value, skip_implicit)
2305 _implicit.append(key)
2306 else:
-> 2307 raise ValueError(
2308 "key '%s' not defined for ConfigDict '%s' and "
2309 "implicit (undefined) keys are not allowed" %
ValueError: key 'default' not defined for ConfigDict '' and implicit (undefined) keys are not allowed
Beta Was this translation helpful? Give feedback.
All reactions