UnicodeDecodeError: \'charmap\' codec can\'t decode byte 0x90 in position 8: character maps to
Am seeing teh above error in a sim
Python3.7:
con = sqlite3.connect(path_to_db)
encoding = "latin1"
con.text_factory = lambda x: str(x, encoding)
# do not preserve non-printable
# con.text_factory = lambda x: str(x, "ascii", errors="ignore")
data = pd.read_sql_query(QUERY, con)
Pydocs on text_factory
the proper encoding for your database is iso-8859-1
according to oracle docs
so When you connect()
to your database, pass the charset='iso-8859-1'
or encoding='iso-8859-1'
try both.