Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
UnicodeEncodeError occurred when collapsed result append to file as like below
./stackcollapse_hprof_original.py out.hprof > collapsed.txt
Traceback (most recent call last):
File "./stackcollapse_hprof_original.py", line 207, in
main()
File "./stackcollapse_hprof_original.py", line 201, in main
print(line, file=out)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0101' in position 704: ordinal not in range(128)
My operating system is Mac OS.
I expect collapsed result is not encoded to utf-8.
So I tried just encode each of result line. After do this it's working well.