https://pantsbuild.org/ logo
#development
Title
# development
b

bitter-ability-32190

05/13/2022, 4:09 PM
I'm seeing
Exception: Cannot start Exclusive access on Destination Logging
when using
rule_runner.run_goal_rule(run.Run, args=["app/app.py"], env_inherit={"PATH", "PYENV_ROOT", "HOME"},)
I assume I'm just missing an arg somewhere? Breadcrumb anyone?
1
w

witty-crayon-22786

05/13/2022, 4:11 PM
um… exclusive access would mean it’s trying to start the dynamic UI, but doesn’t have a TTY probably
b

bitter-ability-32190

05/13/2022, 4:11 PM
Let's just nix that then 😛
w

witty-crayon-22786

05/13/2022, 4:11 PM
oh. no. it’s not the UI… it’s trying to grab the console to connect the process to probably?
b

bitter-ability-32190

05/13/2022, 4:12 PM
Yeah neither of these solve it 😕
global_args=["--no-dynamic-ui", "--no-pantsd"],
Let me try maybe as a Test goal instead of run
w

witty-crayon-22786

05/13/2022, 4:14 PM
ah, you know what: you need to actually wrap in a
with mock_console
block probably
but ignore that comment:
mock_console
does support input
b

bitter-ability-32190

05/13/2022, 4:24 PM
closer...
Copy code
src/python/pants/testutil/rule_runner.py:655: in get_stdout
...
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpjssfy4e9'
w

witty-crayon-22786

05/13/2022, 4:25 PM
are you calling it inside the block?
b

bitter-ability-32190

05/13/2022, 4:25 PM
🙈
I'm still working on my woffee
*coffee
w

witty-crayon-22786

05/13/2022, 4:25 PM
this ain’t rust man… no protection against aliasing, heh
😁 1