UnicodeDecodeError Traceback (most recent call last)
Input In [9], in <cell line: 2>()
1 filename = "/Users/mac/Documents/网络公开信息的使用/renkou.csv"
2 with open(filename,encoding="utf-8") as fp:
----> 3 for line in fp.readlines():
4 print(line)
File ~/opt/anaconda3/lib/python3.9/codecs.py:322, in BufferedIncrementalDecoder.decode(self, input, final)
319 def decode(self, input, final=False):
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 0xca in position 0: invalid continuation byte