I am writing a code on replit and it works perfectly one the file I'm using. However since I want to try to do sometihng to the database that I'm not sure will work I wanted to copy the database onto another replit file, so I tried to download it and then re - upload it onto another database file, and then use this code:
import sqlite3
import os
import tkinter as tk
from tkinter import ttk
root = tk.Tk()
tabs = ttk.Notebook(root)
tabs.place(x=0, y=0)
tab1 = ttk.Frame(tabs)
tabs.add(tab1, text = "Workouts display")
tab2 = ttk.Frame(tabs)
tabs.add(tab2, text = "Checkboxes")
root.title("Gym")
root['background']='red'
add = 0
connection = sqlite3.connect("My database.txt")
c = connection.cursor()
dictionary = [["Leg Day",0],["Shoulder Day",1],["Arm Day",2],["Back Day",3]]
scrollbar = tk.Scrollbar(tab1)
myList = tk.Listbox(tab2, yscrollcommand=scrollbar.set)
c.execute('''
SELECT * FROM Workout
''')
root.mainloop()
to try and call this new database that I've uploaded on this "backup" file so that I can refer to if anything goes wrong in my original. However it's saying that the database disk image is malformed. I've tried several times and it's returning the same message: "sqlite3.DatabaseError: database disk image is malformed"