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

Type error happened when join byte string. #138

Closed
aT0ngMu opened this issue Feb 27, 2023 · 0 comments · Fixed by #145
Closed

Type error happened when join byte string. #138

aT0ngMu opened this issue Feb 27, 2023 · 0 comments · Fixed by #145

Comments

@aT0ngMu
Copy link

aT0ngMu commented Feb 27, 2023

Hi, when I tested _buffer_encode() in class IncrementalEncoder, I found that function alabel() would return bytes-string, which causes the elements of the result list to be of type bytes. However, the join method can only receive parameters of type str, which will cause the program to crash.

The following is the crash stack information:

=== Uncaught Python exception: ===
TypeError: sequence item 0: expected str instance, bytes found
Traceback (most recent call last):
File "incrementalEncoder_driver.py", line 25, in TestOneInput
instance._buffer_encode(data=argStr0,errors="strict",final=argBool2)
File "/home/server1/yuxinwei/DriverCollections/venv/lib/python3.8/site-packages/idna/codec.py", line 57, in _buffer_encode
result_str = '.'.join(result) + trailing_dot # type: ignore
TypeError: sequence item 0: expected str instance, bytes found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant