Im having issuse with my email validator tool, it wont suddenly decode.
I have this error:
File "C:\Users\vk662\OneDrive - ST\Skrivebord\test\email_check.py", line 70, in <module> for row in csv_reader: File "C:\Program Files\Python310\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 4: invalid continuation byte here is the code: on line 70;
email_list = [] with open('email_in/test.csv', 'r', encoding='utf-8') as read_obj: csv_reader = csv.reader(read_obj, delimiter=';') for row in csv_reader: if (row): result = email_check(row[0],email_list) if result["Email ok"]: email_list.append(row[0]) if result["Email ok"]: email_ok.append(row[0]) else: str = "~~" for x, y in result.items(): if y: str += x + "~~" if x == "Duplicate email" and y: if row[0] in email_ok: email_ok.remove(row[0]) email_error.append(row[0] + str) check image below: https://i.sstatic.net/LE2fS.jpg
errors='replace'to theopencall. This will replace unrecognized bytes by question marks.