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

[chiptool.py] Type mismatch on chiptool runner #26976

Closed
ccruzagralopes opened this issue May 31, 2023 · 4 comments
Closed

[chiptool.py] Type mismatch on chiptool runner #26976

ccruzagralopes opened this issue May 31, 2023 · 4 comments
Labels
cert blocker yaml Missing features or bugs in the YAML test harness

Comments

@ccruzagralopes
Copy link
Contributor

Reproduction steps / Feature

When running test cases that use a second commissioner (TH2), we get this error: TypeError: ‘str’ object cannot be interpreted as an integer.

Platform

other

Platform Version(s)

No response

Type

Manually tested with SDK

(Optional) If manually tested please explain why this is only manually tested

No response

Anything else?

Related issues:

@ccruzagralopes
Copy link
Contributor Author

@mikaelhm please comment

@mikaelhm
Copy link
Contributor

mikaelhm commented May 31, 2023

chiptool.py is executed with this command:

./scripts/tests/yaml/chiptool.py tests Test_TC_CADMIN_1_16 --nodeId 0x67188cbf68c34be --delayInMs 250 --timeout 900 --continueOnFailure 1 --PICS /var/tmp/pics --trace_file "/logs/trace_log_2023-05-28_11.45.29_0x67188cbf68c34be_TEST_Test_TC_CADMIN_1_16.log" --trace_decode 1 --nodeId2 51966 --nodeId3 12586990 --endpoint 0 --waitAfterCommissioning 5000 --payload MT:-24J0AFN00KA0648G00

This is the traceback from the error:

�[37m		12. Running �[0m�[1mTH3 reads CurrentFabricIndex attribute and save it for future use.�[0m
Traceback (most recent call last):
File "/root/./scripts/tests/yaml/chiptool.py", line 148, in <module>
chiptool_py()
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
  File "/root/./scripts/tests/yaml/chiptool.py", line 136, in chiptool_py
success = send_yaml_command(commands[1], server_path, server_arguments, pics,
  File "/usr/local/lib/python3.10/dist-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
  File "/root/./scripts/tests/yaml/chiptool.py", line 48, in send_yaml_command
return ctx.forward(chiptool)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 781, in forward
return __self.invoke(__cmd, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
  File "/root/scripts/tests/yaml/runner.py", line 343, in chiptool
return ctx.forward(websocket)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 781, in forward
return __self.invoke(__cmd, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
  File "/root/scripts/tests/yaml/runner.py", line 319, in websocket
return runner.run(parser_group.builder_config, runner_config)
  File "/root/scripts/py_matter_yamltests/matter_yamltests/runner.py", line 150, in run
raise (result)
  File "/root/scripts/py_matter_yamltests/matter_yamltests/runner.py", line 193, in _run
encoded_request = config.adapter.encode(request)
  File "/root/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/adapter.py", line 25, in encode
return self.encoder.encode(request)
  File "/root/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py", line 119, in encode
arguments = self.__get_arguments(request)
  File "/root/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py", line 155, in __get_arguments
arguments = self.__maybe_add_destination(arguments, request)
  File "/root/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py", line 186, in __maybe_add_destination
destination_argument_value = hex(request.node_id)
TypeError: 'str' object cannot be interpreted as an integer

Given that the error happens on hex(request.node_id) is suspect that the nodeId2 and nodeId3 passed in as arguments to chiptool.py are not converted to int.

@mikaelhm
Copy link
Contributor

mikaelhm commented May 31, 2023

@cjandhyala
Copy link
Contributor

@ccruzagralopes is this issue fixed with the PR #27008 ? Pls close the issue if the issue is fixed.

@github-project-automation github-project-automation bot moved this from Open Cert Blockers to Complete in [Certification] Blockers Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cert blocker yaml Missing features or bugs in the YAML test harness
Projects
Archived in project
Development

No branches or pull requests

4 participants