Question: I'm trying to open a file in python so i can read it. Why am I getting these errors? python Project - Nolumes/Seagate Backup Plus

I'm trying to open a file in python so i can read it. Why am I getting these errors? I'm trying to open a file in python so i can read

python Project - Nolumes/Seagate Backup Plus Drive/downl 1 Volumes Seagate Backup Plus Drive downloads texts basic_9.py Proj..7 0 - main.py basic_9.py python Project -/Pycharml 1 import os veny 2 main.py 3 os.chdir("/Volumes/Seagate Backup Plus Drive/downloads/texts") > Milli External Libraries Scratches and Consoles 5 print(os.getcwd()) 6 for i in os. listdir(r'/Volumes/Seagate Backup Plus Drive/downloads/texts'): 7 print(i) 8 9 f = open("abc.txt", "r") 10 print(f.read() 4 Run: + + C | D 1 basic_9 basic_9.py bbc.txt cnn.txt fox.txt msnbc.txt newsok.txt usatoday.txt usnews.txt Traceback (most recent call last): File "/Volumes/Seagate Backup Plus Drive/downloads/texts/basic_9.py", line 10, in print(f.read()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte Oxal in position 547: invalid start byte Favorites !. Structure Process finished with exit code 1 Pun A TODO Problems > Terminal

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!