Skip to content

Fix TypeError when --dest passed as string - #416

Open
McVyp wants to merge 1 commit into
google:masterfrom
McVyp:fix-dest-path-typeerror
Open

Fix TypeError when --dest passed as string#416
McVyp wants to merge 1 commit into
google:masterfrom
McVyp:fix-dest-path-typeerror

Conversation

@McVyp

@McVyp McVyp commented Aug 6, 2026

Copy link
Copy Markdown

Running emu-docker create <emu> <img> --dest <path> throws:

TypeError: unsupported operand type(s) for /: 'str' and 'str'

args.dest comes in as a plain string from argparse (the --dest arg isn't typed as Path), but create_docker_image() tries to use / on it directly here:

https://github.com/google/android-emulator-container-scripts/blob/master/emu/emu_docker.py#L90

if not sys_docker.available() and not sys_docker.can_pull():
            sys_docker.build(args.dest / "sys_img")

Just wraps it in Path(), same as a few lines down for the emulator build:

emu_docker.build(Path(args.dest) / "emulator")

Tested on Ubuntu 26.04 LTS:

emu-docker create stable "C google_apis x86_64" --no-metrics --dest docker-src-37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant