First Guided Project: cannot open file

I am stuck with the code open(). After running the code, I got error at the first step.

My code is:

opened_file = open(‘AppleStore.csv’)
from csv import reader
read_file = reader(opened_file)
apps_data = list(read_file)

print (apps_data)

Pls help.


1 Like


Welcome to the Community!

It seems that it wasn’t clearly mentioned in the instructions to this guided project, but in this case you have to specify encoding for the file to be opened. Just modify the first line of your code in this way:

opened_file = open('AppleStore.csv', encoding = 'utf8')
1 Like