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

tests.py: divert_end(): Read the entire output #1530

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

ampli
Copy link
Member

@ampli ampli commented May 18, 2024

Reading a fixed amount of bytes (in this case 1024) may truncate a utf8 character, leading to Python errors.
Encountered on MacOS in the test_tahi test:

Traceback (most recent call last):
File "/usr/local/src/link-grammar-devel/autogen/bindings/python-examples/tests.py", line 1300, in test_thai
for line in save_stderr.divert_end().decode().split("\n"):
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 1023: unexpected end of data

Reading a fixed amount of bytes may truncate a utf8 character, leading
to Python errors. Encountered on MacOS in the test_tahi test.
@linas linas merged commit 9b9a935 into opencog:master May 20, 2024
1 check passed
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