Hi,
I´m triying to open a downloaded Google Ads csv for my project but i´m reiciving an error:
from csv import reader
opened_file = open('adw_kws.csv')
read_file = reader(opened_file)
kws = list(read_file)
print(kws)
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-6-b145c4bac599> in <module>
2 opened_file = open('adw_kws.csv')
3 read_file = reader(opened_file)
----> 4 kws = list(read_file)
5 print(kws)
/opt/anaconda3/lib/python3.8/codecs.py in decode(self, input, final)
320 # decode input (taking the buffer into account)
321 data = self.buffer + input
--> 322 (result, consumed) = self._buffer_decode(data, self.errors, final)
323 # keep undecoded input until the next call
324 self.buffer = data[consumed:]
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
Anyone knows anything about it? In other cases, when I tried to open a csv (for example from Twitter) I didn´t get any error.
Thank you