UnicodeEncodeError | Python 3.6.9: /usr/bin/python3 Mon Mar 27 10:24:21 2023 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/home/cryan/secure_html/daily/newcategory.py in <module>() |
211 webpage = "".join([s for s in webpage.splitlines(True) if s.strip("\r\n")]) |
212 |
213 |
=> 214 print(webpage) |
215 |
builtin print = <built-in function print>, webpage = '<!doctype html>\n<html lang="en">\n <head>\n <m... </div>\n </div>\n</main>\n \n </body>\n</html>\n' |
UnicodeEncodeError: 'ascii' codec can't encode characters in position 9805-9807: ordinal not in range(128)
args =
('ascii', '<!doctype html>\n<html lang="en">\n <head>\n <m... </div>\n </div>\n</main>\n \n </body>\n</html>\n', 9805, 9808, 'ordinal not in range(128)')
encoding =
'ascii'
end =
9808
object =
'<!doctype html>\n<html lang="en">\n <head>\n <m... </div>\n </div>\n</main>\n \n </body>\n</html>\n'
reason =
'ordinal not in range(128)'
start =
9805
with_traceback =
<built-in method with_traceback of UnicodeEncodeError object>