plotly / orca

Command line application for generating static images of interactive plotly charts
MIT License
293 stars 40 forks source link

IIS 10 write_image() fails on POpen() #321

Open andyp05 opened 4 years ago

andyp05 commented 4 years ago

I think I have found the issue of IIS launching the orca server. In _orca.py ensure_server()

    stderr = DEVNULL if "CI" in os.environ else None  # fix for CI
    orca_state["proc"] = subprocess.Popen(
        cmd_list, stdout=DEVNULL, stderr=stderr
    )

fails with orca_state["proc"] = None If you change to:

    orca_state["proc"] = subprocess.Popen(
        cmd_list, stdout=subprocess.PIPE,
        stderr=subprocess.PIPE, stdin=subprocess.DEVNULL)

it works as expected.

Can I set stdout, stdin, and stderr in a configuration setting instead of modifying source code?

Thanks

antoinerg commented 4 years ago

cc @nicolaskruchten @jonmmease