import sys
import cs50
# checking argv (that there's one and it's a csv)
if (len(sys.argv) != 2):
sys.exit("Usage: roster.py house_name")
housename = sys.argv[1]
#print(house_name)
#open(f"students.db", "w").close()
db = cs50.SQL("sqlite:///students.db")
rows = db.execute("SELECT * FROM students WHERE house = 'housename' ORDER BY last ASC, first ASC")
for x in rows:
print(x)
THANKS IN ADVANCE PSET 7 HOUSES 1)import.py in import.py task is to create a table and insert value from csv file after doing create a connection in roster.py and do select query MY ISSUE IS :- when i execute import.py it successfully create table but when i execute roster.py it display error ""no table found" secondly if i put all import.py code in roster.py then that error removed and got another issue i.e rows = db.execute("SELECT * FROM students WHERE house = sys.agv[1]") sysagv[1] is the name of house given at command line