I'm coding a program; i have a Tkinter window with a view button and i can add names with entry box and add button into a list that will be saved on a db file. Now i want the program to show the list names otomaticly when the program runs. The only problem is that if i want to run the program for the first time, there is no db file, so nothing can be load, so the program won't run and i get this error:
Traceback (most recent call last): File "app3.py", line 156, in <module> refresh() File "app3.py", line 75, in refresh refresh() File "app3.py", line 64, in refresh favorite_movies = pickle.load( open("films.db", "rb")) IOError: [Errno 2] No such file or directory: 'films.db'
It's almost a long file code so i can't post them here.
Before i decided the program to show the list name otomaticly at the same time as the program runs, when i run the program for the first time, it always created the db file itself, but now with changing the code, i don't know what to do.