I have a sqlite database populated with an external program. I am trying to read data using python. When I try to read the data, I get the following error:
OperationalError: Failed to decode UTF-8
If I open the database in sqlite manager and look at the data in the violation record using the built-in view and search, this looks fine, however, if I export the table as csv, I notice the £ symbol in the violation of the steel record  £
If I read csv in python, then the offensive entries still read as  £ , but this is not a problem, I can parse it manually. However, I need to be able to read data directly from the database without the intermediate conversion step to csv.
I looked at some answers on the Internet for similar questions, I still tried to set "text_factory = str", and I also tried to change the column data type from TEXT to BLOB using the SQL manager, but still get an error.
My code below leads to OperationalError: failed to decode UTF-8
conn = sqlite3.connect('test.db')
conn.text_factory = str
curr = conn.cursor()
curr.execute('''SELECT xml_dump FROM hands_1 LIMIT 5000 , 5001''')
row = curr.fetchone()
All entries above 5000 in the database have this problem with the character and therefore generate an error.
Any help was appreciated.