Skip to content

sshcontroller: Print collected output on command error#160

Open
auscompgeek wants to merge 2 commits into
mainfrom
print-output-on-err
Open

sshcontroller: Print collected output on command error#160
auscompgeek wants to merge 2 commits into
mainfrom
print-output-on-err

Conversation

@auscompgeek

@auscompgeek auscompgeek commented Feb 27, 2026

Copy link
Copy Markdown
Member

On deploy, the Python script from get_rio_py_packages can sometimes fail, likely due to a MemoryError when deploying to a roboRIO 1.

def get_rio_py_packages(ssh: SshController) -> typing.Dict[str, str]:
# Use importlib.metadata instead of pip because it's way faster than pip
result = ssh.exec_cmd(
"/usr/local/bin/python3 -c "
"'from importlib.metadata import distributions;"
"import json; import sys; "
"json.dump({dist.name: dist.version for dist in distributions()},sys.stdout)'",
get_output=True,
)

Print the error message from the robot in this scenario.

Comment thread robotpy_installer/sshcontroller.py
@auscompgeek auscompgeek requested a review from virtuald March 1, 2026 05:08
@auscompgeek

Copy link
Copy Markdown
Member Author

One of my team members got another JSONDecodeError from get_rio_py_packages just yesterday. Does this look reasonable to you @virtuald?

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.

2 participants