Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 I am trying to read a pandas file
while reading a csv file i get a error like this
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa3 in position 127: invalid start byte

How to clear this error
what does the open statement look like?
usually you can use something like:
with open(filename, 'r', encoding="UTF-8"):
if that doesn't help, try:
with open(filename, 'r', encoding="ISO-8859-1"):

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  txt-file: read and append missing data sufi 1 131 Dec-07-2019, 08:12 AM
Last Post: Gribouillis
  Read csv file, parse data, and store in a dictionary markellefultz20 4 249 Nov-26-2019, 03:33 PM
Last Post: DeaD_EyE
  Save a file uploaded from client-side without having to read into memory andym118 3 171 Nov-21-2019, 07:34 AM
Last Post: DeaD_EyE
  How to read a text file into a list or an array musouka 2 305 Oct-07-2019, 01:54 PM
Last Post: musouka
  open, read and replace a string in a file Reims 0 151 Oct-02-2019, 01:30 PM
Last Post: Reims
  How do I read the HTML files in a directory and write the content into a CSV file? glittergirl 1 179 Sep-23-2019, 11:01 AM
Last Post: Larz60+
  Read each line, replace string and save into a new file igormonteiro 2 284 Sep-15-2019, 01:24 PM
Last Post: buran
  How to read a file using stdin? pyth0nus3r 1 203 Aug-24-2019, 01:14 AM
Last Post: Larz60+
  read text file and write into html with correct link jacklee26 4 322 Aug-02-2019, 05:48 AM
Last Post: jacklee26
  Read a remote text file Sandy7771989 1 669 Jul-18-2019, 06:55 PM
Last Post: ndc85430

Forum Jump:

Users browsing this thread: 1 Guest(s)