Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python cannot send list of int #1215

Closed
ShalevNehorai opened this issue Apr 25, 2024 · 1 comment · Fixed by #1223
Closed

python cannot send list of int #1215

ShalevNehorai opened this issue Apr 25, 2024 · 1 comment · Fixed by #1223
Assignees
Labels
bug Something isn't working python Pull requests that update Python code

Comments

@ShalevNehorai
Copy link

First check out our main documentation site at https://openc3.com.

Describe the bug
When sending a list of integers using python API I encounter an error:
File "C:\Python\lib\site-packages\openc3\script\commands.py", line 32, in cmd return _cmd("cmd", "cmd_no_hazardous_check", *args, **kwargs) File "C:\Python\lib\site-packages\openc3\script\commands.py", line 240, in _cmd _log_cmd(target_name, cmd_name, cmd_params, raw, no_range, no_hazardous) File "C:\Python\lib\site-packages\openc3\script\commands.py", line 179, in _log_cmd print(_cmd_string(target_name, cmd_name, cmd_params, raw)) File "C:\Python\lib\site-packages\openc3\script\commands.py", line 161, in _cmd_string value = f"[{', '.join(value)}]" TypeError: sequence item 0: expected str instance, int found

a fix suggestion (that worked for me) is changing in file openc3\python\openc3\script\commands.py, line 161, in _cmd_string
from
value = f"[{', '.join(value)}]"
to
value = str(value)

I am using package openc3 version 5.15.2

@jmthomas
Copy link
Member

Can you show the script that you tried that didn't work?

@jmthomas jmthomas added triage More information is needed python Pull requests that update Python code bug Something isn't working and removed triage More information is needed labels Apr 25, 2024
@jmthomas jmthomas self-assigned this May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Pull requests that update Python code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants