Skip to content

Capture Highs output when solving #3210

Open
@Coloquinte

Description

@Coloquinte

Summary

Highs logs are not entirely captured. As discussed on the Highs bug tracker, it can result in error messages like the following:
ERROR: Output stream (<_io.TextIOWrapper name='' mode='w' encoding='utf-8'>) closed before all output was written to it. The following was left in the output buffer: 'ERROR: Output stream (<_io.TextIOWrapper name='' mode='w'\nencoding='utf-8'>). The expected behaviour is that no error message and no log line is written.

Logs in Highs may be written by any function, including addRows. I think the reason for this issue is that they are not covered by TeeStream. This is related to #3003.

Steps to reproduce the issue

Run the hangs.py file from this repository on Windows

Error Message

Multiple lines like
ERROR: Output stream (<_io.TextIOWrapper name='' mode='w' encoding='utf-8'>) closed before all output was written to it. The following was left in the output buffer: 'ERROR: Output stream (<_io.TextIOWrapper name='' mode='w'\nencoding='utf-8'>)

Information on your system

Pyomo version: 6.7
Python version: 3.11
Operating system: Windows
How Pyomo was installed (PyPI, conda, source): pip
Solver (if applicable): Highspy

Additional information

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions