Change line 223 to solver.solve(m,load_solutions=False)
Error Message
$ # Output message here, including entire stack trace, if available
======================================================================
ERROR: test_solve_square (__main__.TestExternalGreyBoxBlock)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/zedongpeng/Github/pyomo/pyomo/contrib/pynumero/interfaces/tests/test_external_pyomo_block.py", line 223, in test_solve_square
solver.solve(m,load_solutions=False)
File "/Users/zedongpeng/Github/pyomo/pyomo/contrib/pynumero/algorithms/solvers/cyipopt_solver.py", line 405, in solve
sm = nlp.symbol_map
AttributeError: 'PyomoNLPWithGreyBoxBlocks' object has no attribute 'symbol_map'
Summary
cyipopt
solver will fail when we setload_solution=False
.Steps to reproduce the issue
https://github.com/Pyomo/pyomo/blob/99dc0f17159ef94a0599096a116b04089d25d7d4/pyomo/contrib/pynumero/interfaces/tests/test_external_pyomo_block.py#L199-L223
Change line 223 to
solver.solve(m,load_solutions=False)
Error Message
Information on your system
Pyomo version: 6.6.2.dev0 Python version: 3.10.12 Operating system: macOS How Pyomo was installed (PyPI, conda, source): source Solver (if applicable): cyipopt
Additional information