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

[Bug]: everflow/test_everflow_testbed.py::TestEverflowV4EgressAclEgressMirror::test_everflow_dscp_with_policer test cases failing dude to "TypeError: string argument without an encoding" while sending packets #16745

Open
kaushiksrivatsav opened this issue Jan 31, 2025 · 2 comments · May be fixed by #16806
Assignees
Labels

Comments

@kaushiksrivatsav
Copy link

Issue Description

when the traffic is being sent from the script there is a mismatch in type in the file "acstests/everflow_policer_test.py" when using the testutils.send_packet() function

changing this script from
testutils.send_packet(self, self.src_port, str(self.base_pkt), count=self.NUM_OF_TOTAL_PACKETS)
to this
testutils.send_packet(self, self.src_port, bytes(self.base_pkt), count=self.NUM_OF_TOTAL_PACKETS)

creates further more issues in the acstests/everflow_policer_test.py file.

Results you see

ERROR: everflow_policer_test.EverflowPolicerTest
E ----------------------------------------------------------------------
E Traceback (most recent call last):
E File "acstests/everflow_policer_test.py", line 324, in runTest
E count = self.checkOriginalFlow()
E File "acstests/everflow_policer_test.py", line 183, in checkOriginalFlow
E testutils.send_packet(self, self.src_port, str(self.base_pkt), count=self.NUM_OF_TOTAL_PACKETS)
E File "/root/env-python3/lib/python3.7/site-packages/ptf/testutils.py", line 3202, in send_packet
E pkt = bytes(pkt)
E TypeError: string argument without an encoding
E
E ----------------------------------------------------------------------

Results you expected to see

test case to send packets successfully

Is it platform specific

marvell

Relevant log output

Output of show version

show version

SONiC Software Version: SONiC.202411.0-dirty-20250127.162535
SONiC OS Version: 12
Distribution: Debian 12.9
Kernel: 6.1.0-22-2-arm64
Build commit: bed58c457
Build date: Mon Jan 27 16:52:07 UTC 2025
Built by: marvell@cpss-arm-vm04

Attach files (if any)

No response

@bingwang-ms bingwang-ms self-assigned this Feb 5, 2025
@yxieca yxieca added the Triaged label Feb 5, 2025
@bingwang-ms
Copy link
Collaborator

Will take a look

@bingwang-ms
Copy link
Collaborator

@wsycqyz Is this a known Python3 issue?

@veronica-arista veronica-arista linked a pull request Feb 5, 2025 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants