Closed adam-a-a closed 1 year ago
Thanks for bringing this up @adam-a-a. Can you provide the following information, if available:
python -c "import sys; print(sys.executable)"
pip list
pip show pyomo idaes-pse dispatches
Thanks for bringing this up @adam-a-a. Can you provide the following information, if available:
- Exact pytest command used
- A larger portion of the pytest output, containing the stack trace (for at least one of the 25 errors)
The output of the following commands run in the same environment
python -c "import sys; print(sys.executable)"
pip list
pip show pyomo idaes-pse dispatches
@lbianchi-lbl - I'm not up-to-speed on which versions of IDAES and Pyomo I should have installed in my environment and probably should just reinstall or update after this, but here are my responses to your inquiries:
pytest
on the whole repo.----------------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------------
ERROR pyomo.core:helmholtz_functions.py:1961 evaluating object as numeric value: fs.props_water.dens_mass_star/fs.props_water.mw
(object: <class 'pyomo.core.expr.numeric_expr.NPV_DivisionExpression'>)
float division by zero
ERROR idaes.core.base.process_block:process_block.py:41 Failure in build: fs.props_water
Traceback (most recent call last):
File "C:\Users\adama\Anaconda3\envs\dispatches\lib\site-packages\idaes\core\base\process_block.py", line 39, in _rule_default
b.build()
File "C:\Users\adama\Anaconda3\envs\dispatches\lib\site-packages\idaes\models\properties\general_helmholtz\helmholtz_functions.py", line 1756, in build
self.add_param(
File "C:\Users\adama\Anaconda3\envs\dispatches\lib\site-packages\idaes\models\properties\general_helmholtz\helmholtz_functions.py", line 1961, in add_param
initialize=pyo.value(expr),
File "pyomo\core\expr\numvalue.pyx", line 153, in pyomo.core.expr.numvalue.value
File "pyomo\core\expr\numvalue.pyx", line 138, in pyomo.core.expr.numvalue.value
File "C:\Users\adama\Anaconda3\envs\dispatches\lib\site-packages\pyomo\core\expr\base.py", line 115, in __call__
return evaluate_expression(self, exception)
File "C:\Users\adama\Anaconda3\envs\dispatches\lib\site-packages\pyomo\core\expr\visitor.py", line 1242, in evaluate_expression
ans = visitor.dfs_postorder_stack(exp)
File "C:\Users\adama\Anaconda3\envs\dispatches\lib\site-packages\pyomo\core\expr\visitor.py", line 897, in dfs_postorder_stack
ans = self.visit(_obj, _result)
File "C:\Users\adama\Anaconda3\envs\dispatches\lib\site-packages\pyomo\core\expr\visitor.py", line 1129, in visit
return node._apply_operation(values)
File "pyomo\core\expr\numeric_expr.pyx", line 552, in pyomo.core.expr.numeric_expr.DivisionExpression._apply_operation
ZeroDivisionError: float division by zero
python -c "import sys; print(sys.executable)"
--> C:\Users\adama\Anaconda3\envs\dispatches\python.exe
pip list
:
Package Version Editable project location
---------------------------------- --------- ------------------------------------
absl-py 1.4.0
addheader 0.3.2
alabaster 0.7.13
anyio 3.6.2
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
arrow 1.2.3
astunparse 1.6.3
attrs 23.1.0
Babel 2.12.1
backcall 0.2.0
backports.shutil-get-terminal-size 1.0.0
beautifulsoup4 4.12.2
bleach 6.0.0
blosc2 2.0.0
bunch 1.0.1
cachetools 5.3.0
certifi 2022.12.7
cffi 1.15.1
charset-normalizer 3.1.0
click 8.1.3
colorama 0.4.6
comm 0.1.3
contourpy 1.0.7
coramin 0.1.1
coverage 7.2.3
cycler 0.11.0
Cython 0.29.34
debugpy 1.6.7
decorator 5.1.1
defusedxml 0.7.1
dispatches 1.3.dev0 c:\users\adama\dispatches\dispatches
dispatches-data-packages 23.3.19
dispatches-dynamic-sweep-data 23.4.4
dispatches-nbcheck 0.2.1
dispatches-sample-data 22.9.19
distro 1.8.0
docutils 0.17.1
et-xmlfile 1.1.0
exceptiongroup 1.1.1
fastjsonschema 2.16.3
Flask 2.2.3
Flask-Cors 3.0.10
flatbuffers 23.3.3
fonttools 4.39.3
fqdn 1.5.1
gast 0.4.0
google-auth 2.17.3
google-auth-oauthlib 1.0.0
google-pasta 0.2.0
graphviz 0.20.1
gridx-egret 0.5.5
gridx-prescient 2.2.2
grpcio 1.54.0
gurobipy 10.0.1
h5py 3.8.0
idaes-pse 2.0.0
idna 3.4
imagesize 1.4.1
importlib-metadata 6.6.0
iniconfig 2.0.0
ipykernel 6.22.0
ipython 7.34.0
ipython-genutils 0.2.0
ipywidgets 8.0.6
isoduration 20.11.0
itsdangerous 2.1.2
jax 0.4.8
jedi 0.18.2
Jinja2 3.1.2
joblib 1.2.0
jsonpointer 2.3
jsonschema 4.17.3
jupyter 1.0.0
jupyter_client 8.2.0
jupyter-console 6.6.3
jupyter_core 5.3.0
jupyter-events 0.6.3
jupyter_server 2.5.0
jupyter_server_terminals 0.4.4
jupyterlab-pygments 0.2.2
jupyterlab-widgets 3.0.7
keras 2.12.0
kiwisolver 1.4.4
libclang 16.0.0
llvmlite 0.39.1
lxml 4.9.2
Markdown 3.4.3
MarkupSafe 2.1.2
matplotlib 3.7.1
matplotlib-inline 0.1.6
mistune 2.0.5
ml-dtypes 0.1.0
mpmath 1.3.0
msgpack 1.0.5
nbclassic 0.5.5
nbclient 0.7.3
nbconvert 7.3.1
nbformat 5.8.0
nbsphinx 0.9.1
nbval 0.10.0
nest-asyncio 1.5.6
networkx 3.1
notebook 6.5.4
notebook_shim 0.2.2
NREL-PySAM 4.1.0
numba 0.56.4
numexpr 2.8.4
numpy 1.23.5
oauthlib 3.2.2
omlt 1.1
openpyxl 3.1.2
opt-einsum 3.3.0
packaging 23.1
pandas 1.4.4
pandocfilters 1.5.0
parso 0.8.3
pickleshare 0.7.5
Pillow 9.5.0
Pint 0.20.1
pip 23.0.1
platformdirs 3.2.0
pluggy 1.0.0
ply 3.11
prometheus-client 0.16.0
prompt-toolkit 3.0.38
protobuf 4.22.3
psutil 5.9.5
py-cpuinfo 9.0.0
pyasn1 0.5.0
pyasn1-modules 0.3.0
pycparser 2.21
Pygments 2.15.1
Pyomo 6.5.1a0
pyparsing 3.0.9
pyrsistent 0.19.3
pytest 7.3.1
pytest-cov 4.0.0
python-dateutil 2.8.2
python-dotenv 1.0.0
python-json-logger 2.0.7
python-slugify 8.0.1
pytz 2023.3
pywin32 306
pywinpty 2.0.10
PyYAML 6.0
pyzmq 25.0.2
qtconsole 5.4.2
QtPy 2.3.1
rbfopt 4.2.5
requests 2.28.2
requests-oauthlib 1.3.1
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rsa 4.9
scikit-learn 1.2.2
scipy 1.10.1
seaborn 0.12.2
Send2Trash 1.8.0
setuptools 66.0.0
six 1.16.0
sniffio 1.3.0
snowballstemmer 2.2.0
soupsieve 2.4.1
Sphinx 4.2.0
sphinx-rtd-theme 1.2.0
sphinxcontrib-applehelp 1.0.4
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 2.0.1
sphinxcontrib-jquery 4.1
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.5
sympy 1.11.1
tables 3.8.0
tensorboard 2.12.2
tensorboard-data-server 0.7.0
tensorboard-plugin-wit 1.8.1
tensorflow 2.12.0
tensorflow-estimator 2.12.0
tensorflow-intel 2.12.0
tensorflow-io-gcs-filesystem 0.31.0
termcolor 2.3.0
terminado 0.17.1
text-unidecode 1.3
threadpoolctl 3.1.0
tinycss2 1.2.1
tinydb 4.7.1
tomli 2.0.1
tornado 6.3.1
traitlets 5.9.0
tslearn 0.5.3.2
typing_extensions 4.5.0
uri-template 1.2.0
urllib3 1.26.15
wcwidth 0.2.6
webcolors 1.13
webencodings 0.5.1
websocket-client 1.5.1
Werkzeug 2.2.3
wheel 0.38.4
widgetsnbextension 4.0.7
wrapt 1.14.1
xlrd 2.0.1
zipp 3.15.0
pip show pyomo idaes-pse dispatches
:
Name: Pyomo
Version: 6.5.1a0
Summary: Pyomo: Python Optimization Modeling Objects
Home-page: http://pyomo.org
Author:
Author-email:
License: BSD
Location: c:\users\adama\anaconda3\envs\dispatches\lib\site-packages
Requires: ply
Required-by: coramin, gridx-egret, gridx-prescient, idaes-pse, omlt, rbfopt
---
Name: idaes-pse
Version: 2.0.0
Summary: IDAES Process Systems Engineering Framework
Home-page: https://idaes.org
Author:
Author-email:
License: BSD
Location: c:\users\adama\anaconda3\envs\dispatches\lib\site-packages
Requires: backports.shutil-get-terminal-size, bunch, click, colorama, distro, flask, flask-cors, ipython, jupyter, lxml, matplotlib, nbconvert, nbformat, networkx, numpy, omlt, openpyxl,
pandas, pint, psutil, pyomo, pytest, python-slugify, pyyaml, rbfopt, requests, scipy, sympy, tinydb, xlrd
Required-by: dispatches
---
Name: dispatches
Version: 1.3.dev0
Summary: GMLC DISPATCHES software tools
Home-page: https://github.com/gmlc-dispatches/dispatches
Author: DISPATCHES team
Author-email:
License:
Location: c:\users\adama\dispatches\dispatches
Editable project location: c:\users\adama\dispatches\dispatches
Requires: dispatches-data-packages, graphviz, gridx-prescient, idaes-pse, jupyter, nrel-pysam, pytest
Required-by:
One things that jumps to the eye is the Pyomo version - I've just tried installing locally from the current main
and I get 6.5.0, although this might depend on whether #203 had been merged or not at the time of your original attempt.
Can you try repeating the test, preferably in a fresh environment, using the current main (03b936a7c0999c2e91f542094557c708532ba7e6)?
Closing this as we haven't been able to reproduce the errors. If this keeps happening to @adam-a-a or others, please feel free to reopen this or create a new issue.
I ran pytest after pulling from main and got back several errors. I'm posting the issue to either bring awareness to the errors or confirm that is a known issue and someone is working on tackling this: