Skip to content

sprite.command.output intermittently fails with ExecError: 1 even for trivial commands #11

@Roadmaster

Description

@Roadmaster

When using the sprites-py SDK, commands intermittently fail with
ExecError: 1 even when the command itself is trivial and should never
fail:

>>> self.sprite.command("echo", "test").output()

b'test\n'

>>> self.sprite.command("echo", "test").output()

*** sprites.exceptions.ExecError: 1

>>> self.sprite.command("echo", "test").output()

b'test\n'

>>> self.sprite.command("echo", "test").output()

b'test\n'

>>> self.sprite.command("echo", "test").output()

*** sprites.exceptions.ExecError: 1

This happens both in interactive debugging (ipdb) and normal program
execution

Tracing the Code Path

  1. sprite.command("echo", "test") creates a Cmd object (sprite.py)

  2. .output() calls _run_sync() which calls _run_async() (exec.py)

  3. _run_async() delegates to run_ws_command() (websocket.py)

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