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

file notifier: change the encoding to resolve UnicodeEncodeError error #3389

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

LiliDeng
Copy link
Collaborator

Fix below exception.

2024-08-21T21:24:48.3996697Z   File "C:\hostedtoolcache\windows\Python\3.10.16\x64\lib\concurrent\futures\_base.py", line 403, in __get_result
2024-08-21T21:24:48.3997161Z     raise self._exception
2024-08-21T21:24:48.3997636Z   File "C:\hostedtoolcache\windows\Python\3.10.16\x64\lib\concurrent\futures\thread.py", line 58, in run
2024-08-21T21:24:48.3998100Z     result = self.fn(*self.args, **self.kwargs)
2024-08-21T21:24:48.3998523Z   File "D:\a\_work\1\s\lisa\lisa\util\parallel.py", line 58, in __call__
2024-08-21T21:24:48.3998912Z     output = self._task()
2024-08-21T21:24:48.3999305Z   File "D:\a\_work\1\s\lisa\lisa\notifiers\file.py", line 43, in _received_message
2024-08-21T21:24:48.3999886Z     f.write(f"{datetime.now(timezone.utc):%Y-%m-%d %H:%M:%S.%ff}: {message}\n")
2024-08-21T21:24:48.4000640Z   File "C:\hostedtoolcache\windows\Python\3.10.16\x64\lib\encodings\cp1252.py", line 19, in encode
2024-08-21T21:24:48.4001211Z     return codecs.charmap_encode(input,self.errors,encoding_table)[0]
2024-08-21T21:24:48.4001894Z UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' in position 29537: character maps to <undefined>
2024-08-21T21:24:51.7851471Z ##[error]Script failed with exit code: 1

@LiliDeng LiliDeng merged commit 0044260 into main Aug 23, 2024
45 checks passed
@LiliDeng LiliDeng deleted the lildeng/fix_8_22_001 branch August 23, 2024 03:44
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