I am currently working through Automate the Boring Stuff with Python: Practical Programming for Total Beginners and I have come across a bug I can't seem to get a good answer for.
The error is:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyperclip/__init__.py", line 596, in lazy_load_stub_paste
return paste()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyperclip/__init__.py", line 109, in paste_osx_pbcopy
return stdout.decode(ENCODING)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa8 in position 197: invalid start byte
The problematic line of code:
text = str(pyperclip.paste())
The only way I could get the full script to work was by decreasing with is copied from the webpage. Instead of using CTRL+A then CTRL+C, I manually selected only the text portion of the main body on the page.
I tried a few suggestions from Stack Overflow, but the did not seem to work.
I am currently working through Automate the Boring Stuff with Python: Practical Programming for Total Beginners and I have come across a bug I can't seem to get a good answer for.
The error is:
The problematic line of code:
text = str(pyperclip.paste())
The only way I could get the full script to work was by decreasing with is copied from the webpage. Instead of using CTRL+A then CTRL+C, I manually selected only the text portion of the main body on the page.
I tried a few suggestions from Stack Overflow, but the did not seem to work.
https://stackoverflow.com/questions/47735949/unicodedecodeerror-utf-8-codec-cant-decode-byte-invalid-start-byte