I wrote a Python script that will download a webpage, extract a portion of the text displayed on the page and write the extracted portion to an SQLite database. When I ran the script, I saw the message below displayed:
You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
I had created the following function to establish the connection to the SQLITE 3 database:
def create_connection (db_file): """ Create a database connection to an SQL database Return connection object or none """ try: conn = sqlite3.connect(db_file) return conn except Exception as e: print(e) return None
[ More Info ]