Is there a way to preprogram text files and skip these characters?
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa1 in position 1395: invalid start byte
Try the following:
str.decode('utf-8',errors='ignore')
I think your text file has a special character, so "utf-8" cannot be decoded.
You need to try using "ISO-8859-1" instead of "utf-8". eg:
import sys reload(sys).setdefaultencoding("ISO-8859-1") # put your code here
Source: https://habr.com/ru/post/1541362/More articles:Python command line flags - pythonSpring 4, Hibernate JPA JarInputStreamBasedArchiveDescriptor Error in Websphere 8.5.5 - springWhat is the standard HW test technique when there are cases where RTL and Goldenmodel can produce different but correct results? - verilogpython: UnicodeDecodeError: codec 'utf8' cannot decode byte 0xc0 at position 0: invalid start byte - pythonJPA-objects as a joint bank, not working in the WAR file unde Tomcat 7.0.27 - jarะะฐะบ ะธัะฟะพะปัะทะพะฒะฐัั ะฒ spring mvc - spring-mvchttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1541364/algorithm-to-schedule-jobs-to-minimise-change&usg=ALkJrhgDApo_ixTk46c7RXT9Rhib0gvpAgWhat algorithm can be used to mark up image files? - diffIs there a JSFiddle version for Meteor? - meteorknitr: save cache when I make small changes to a piece - cachingAll Articles