for the user: replace in your script “Œ” with “O E” or an other utf-8 encodable character, because character u’\xe6’ is Œ
for the developer, on solving the error: UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xe6’ in position 8: ordinal not in range(128)
read https://stackoverflow.com/questions/46790968/removing-characters-like-u0152-xe6-from-string
i guess in the source code you used:
with open("file.txt", 'r', encoding="utf-8"):
...
the solution should be replacing encoding type from ‘utf-8’ to ‘cp1252’