[Errno 2] No such file or directory
(1) By Digitek on 2020-10-26 01:48:29 [link] [source]
Hi. I am using the Sublime text editor and Git Bash. When I run the following in Git Bash - Python database.py Then I get the following return message Pieter@DESKTOP-EPCS4D9 MINGW64 /c/Web_Dev $ python database.py C:\Users\Pieter\AppData\Local\Programs\Python\Python38\python.exe: can't open file 'database.py': [Errno 2] No such file or directory I would like to point out that when I go to the root directory I can see that SQLite has created the following database in the directory, address_book.db. ##################################################################### Below is my code in Sublime. #The * = everythng from tkinter import * from PIL import ImageTk,ImageTk import sqlite3 #This is the first thing you should always do when working with Tkinter root = Tk() root.title("Rental Social Media Management System") root.iconbitmap('c:/Web_Dev/RSMM_Icon.ico') root.geometry("400x400") #Database #Creating the database to connecto to conn = sqlite3.connect('address_book.db') #Cursor #Creating the cursor c = conn.cursor() #Table #Creatingt the table c.execute("""CREATE TABLE addresses ( first_name text, last_name text, zipcode integer )""") #Commit changes conn.commit() #Close connection conn.close() #This is the end of our loop widget or ending root.mainloop() #Now run it on Git Bash ######################################################## Please assist me to fix this.
(2) By Keith Medcalf (kmedcalf) on 2020-10-26 02:53:50 in reply to 1 [source]
No clue what is a Sublime or a Git bash, but the Windows ERRNO 2 means that the thing for which you were looking does not exist in the location where you were looking.