Problem with rekey

Hi I´m using python 3.12 and sqlite3 and sqlcipher3 community. My IDE is PyCharm Community 2023.3.5.
When trying to rekey nothing happens an no error is shown! The database is not empty.
As you can see I have tried many different ways. Anyone had the same problem? All suggestions are appreciated.
Here is my code.

def change_key(current_key, new_key):

try:
    print(current_key, new_key) # Values are correct
    conn = create_connection()
    cur = conn.cursor()
    # cur.execute("PRAGMA key = '{}'".format(current_key))

    # cur.execute("PRAGMA cipher_compatibility = 3")
    # cur.execute(f"PRAGMA key = '{current_key}'")
   
       cur.execute("PRAGMA key = '{}'".format(current_key))

    # Rekey the database with the new key
    # cur.execute(f"PRAGMA rekey = '{new_key}'")

      cur.execute("PRAGMA rekey = '{}'".format(new_key))

    # Commit changes and close the connection
      conn.commit()
      conn.close()
except Error as e:
      print(e)

When you say nothing happens, are you still able to open the database using the old key value?

Yes no problem. Yesterday I finally managed to compile sqlcipher and got sqlite3 exe and dll. I will try with them but I don’t know how to get them to work in Pycharm. Where do I put them? Shall I still import sqlcipher in the code?

Leslie