Skip to content

dependency on capturer #135

@fbergmann

Description

@fbergmann

I'm having the problem in the COPASI biosimulators package, that the simulator hangs (on macOS) immediately as long as logging is enabled. I've narrowed this down to the capturer module being used by the utils package, unfortunately even the simple test file:

import subprocess
from capturer import CaptureOutput

with CaptureOutput() as capturer:
    # Generate some output from Python.
    print ("Output from Python")
    # Generate output from a subprocess.
    subprocess.call(["echo", "Output from a subprocess"])
    # Get the output in each of the supported formats.
    assert (capturer.get_bytes() == b'Output from Python\r\nOutput from a subprocess\r\n')
    assert (capturer.get_lines() == [u'Output from Python', u'Output from a subprocess'])
    assert (capturer.get_text() == u'Output from Python\nOutput from a subprocess')

freezes the application immediately. Unfortunately with logging disabled, the application does not actually process the model. I've verified this with python 3.11 and python 3.9.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions