-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I have this script, almost straight from the README:
import os
from sprites import SpritesClient
# Create a client
client = SpritesClient(token=os.environ["SPRITES_TOKEN"])
# Get a sprite handle
sprite = client.sprite("my-sprite")
# Use the Go-style API
cmd = sprite.command("ls", "-la")
output = cmd.output()
print(output.decode())And I've installed dependencies:
$ uv pip install sprites-py
Resolved 8 packages in 8ms
Installed 8 packages in 10ms
+ anyio==4.12.1
+ certifi==2026.1.4
+ h11==0.16.0
+ httpcore==1.0.9
+ httpx==0.28.1
+ idna==3.11
+ sprites-py==0.0.1This always works:
❯ sprite exec -s my-sprite hostname
my-spriteBut this only occasionally works:
$ python sprites_command.py
Traceback (most recent call last):
File "sprites_command.py", line 13, in <module>
output = cmd.output()
File "sprites/exec.py", line 128, in output
raise ExitError(code, self._stdout_data, self._stderr_data)
sprites.exceptions.ExecError: 1
$ python sprites_command.py
Traceback (most recent call last):
File "sprites_command.py", line 13, in <module>
output = cmd.output()
File "sprites/exec.py", line 128, in output
raise ExitError(code, self._stdout_data, self._stderr_data)
sprites.exceptions.ExecError: 1
$ python sprites_command.py
my-sprite
$ python sprites_command.py
my-sprite
$ python sprites_command.py
Traceback (most recent call last):
File "sprites_command.py", line 13, in <module>
output = cmd.output()
File "sprites/exec.py", line 128, in output
raise ExitError(code, self._stdout_data, self._stderr_data)
sprites.exceptions.ExecError: 1Metadata
Metadata
Assignees
Labels
No labels