Python error. Command returned non-zero exit status 0. #251

Open
opened 2025-11-28 04:06:16 -05:00 by sind13 · 9 comments
sind13 commented 2025-11-28 04:06:16 -05:00 (Migrated from github.com)

when i run "sudo venv/bin/python3 main.py" it gives me this:

? Select Android version Android 11
? Please select an action Install
? Select apps ['gapps', 'libhoudini']
ERROR: [20:00:48] Stopping container

Traceback (most recent call last):
File "/home/kawakamik/waydroid_script/waydroid_script/main.py", line 357, in
main()
~~~~^^
File "/home/kawakamik/waydroid_script/waydroid_script/main.py", line 353, in main
interact()
~~~~~~~~^^
File "/home/kawakamik/waydroid_script/waydroid_script/main.py", line 255, in interact
install_app(args)
~~~~~~~~~~~^^^^^^
File "/home/kawakamik/waydroid_script/waydroid_script/main.py", line 95, in install_app
container.stop()
~~~~~~~~~~~~~~^^
File "/home/kawakamik/waydroid_script/waydroid_script/tools/container.py", line 46, in stop
run(["waydroid", "container", "stop"])
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kawakamik/waydroid_script/waydroid_script/tools/helper.py", line 48, in run
raise subprocess.CalledProcessError(
...<3 lines>...
)
subprocess.CalledProcessError: Command '['waydroid', 'container', 'stop']' returned non-zero exit status 0.

cant find any solution to this
i runned " git clone https://github.com/casualsnek/waydroid_script
cd waydroid_script
python3 -m venv venv
source venv/bin/activate
venv/bin/pip install -r requirements.txt
sudo venv/bin/python3 main.py" before, but it gave the same thing

when i run "sudo venv/bin/python3 main.py" it gives me this: ? Select Android version Android 11 ? Please select an action Install ? Select apps ['gapps', 'libhoudini'] ERROR: [20:00:48] Stopping container Traceback (most recent call last): File "/home/kawakamik/waydroid_script/waydroid_script/main.py", line 357, in <module> main() ~~~~^^ File "/home/kawakamik/waydroid_script/waydroid_script/main.py", line 353, in main interact() ~~~~~~~~^^ File "/home/kawakamik/waydroid_script/waydroid_script/main.py", line 255, in interact install_app(args) ~~~~~~~~~~~^^^^^^ File "/home/kawakamik/waydroid_script/waydroid_script/main.py", line 95, in install_app container.stop() ~~~~~~~~~~~~~~^^ File "/home/kawakamik/waydroid_script/waydroid_script/tools/container.py", line 46, in stop run(["waydroid", "container", "stop"]) ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kawakamik/waydroid_script/waydroid_script/tools/helper.py", line 48, in run raise subprocess.CalledProcessError( ...<3 lines>... ) subprocess.CalledProcessError: Command '['waydroid', 'container', 'stop']' returned non-zero exit status 0. cant find any solution to this i runned " git clone https://github.com/casualsnek/waydroid_script cd waydroid_script python3 -m venv venv source venv/bin/activate venv/bin/pip install -r requirements.txt sudo venv/bin/python3 main.py" before, but it gave the same thing
sind13 commented 2025-11-28 04:25:11 -05:00 (Migrated from github.com)

oh the OS is CachyOS x86_64
kernel: Linux 6.17.9-2-cachyos

oh the OS is CachyOS x86_64 kernel: Linux 6.17.9-2-cachyos
CodeByHardik commented 2025-12-13 09:52:54 -05:00 (Migrated from github.com)

Same Here :(

Same Here :(
Theylanh commented 2025-12-17 16:22:56 -05:00 (Migrated from github.com)

Same for me.

Same for me.
charifekelvin-ux commented 2025-12-19 10:41:02 -05:00 (Migrated from github.com)

same here

same here
CodeByHardik commented 2025-12-19 11:09:14 -05:00 (Migrated from github.com)

I think manual patching is required. Is this repo dead? Because no updates.

I think manual patching is required. Is this repo dead? Because no updates.
JonasAlv commented 2025-12-19 16:38:02 -05:00 (Migrated from github.com)

I think manual patching is required. Is this repo dead? Because no updates.

i guess ill fork and update

> I think manual patching is required. Is this repo dead? Because no updates. i guess ill fork and update
JonasAlv commented 2025-12-19 16:52:50 -05:00 (Migrated from github.com)

here the Fixed script

here the [Fixed](https://github.com/JonasAlv/waydroid_script) script
No-Biggie805 commented 2025-12-25 06:39:57 -05:00 (Migrated from github.com)

I had to do a fresh install, then I tried to do it one by one, and it worked. Now, installing multiple ones, works.
Maybe upon updating waydroid it caused the issues. Will see, trying to be wary of it now.

I had to do a fresh install, then I tried to do it one by one, and it worked. Now, installing multiple ones, works. Maybe upon updating waydroid it caused the issues. Will see, trying to be wary of it now.
neodark152 commented 2026-01-15 22:27:14 -05:00 (Migrated from github.com)

I encountered the same issue on Arch Linux. The root cause is that waydroid container stop now outputs logs (e.g., [11:03:07] Stopping container) to stderr even when it exits successfully (exit code 0).

The script's tools/helper.py incorrectly treats any output in stderr as a fatal error, ignoring the successful return code.

Fix:
Modify waydroid_script/tools/helper.py.
Find the run function (around line 48) and change the check condition:

# Old code (causes crash):
# if result.stderr:

# New code (fixes the issue):
if result.returncode != 0 and result.stderr:
I encountered the same issue on Arch Linux. The root cause is that `waydroid container stop` now outputs logs (e.g., `[11:03:07] Stopping container`) to **stderr** even when it exits successfully (exit code 0). The script's `tools/helper.py` incorrectly treats *any* output in stderr as a fatal error, ignoring the successful return code. **Fix:** Modify `waydroid_script/tools/helper.py`. Find the `run` function (around line 48) and change the check condition: ```python # Old code (causes crash): # if result.stderr: # New code (fixes the issue): if result.returncode != 0 and result.stderr:
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wbruno/waydroid_script#251