Du mangler AUTO INCREMENT
for primærnøgle i tabellen med ankomsttider. Du skal bare tilføje AUTO_INCREMENT
mens du opretter tabel
stt.execute("CREATE TABLE IF NOT EXISTS arrivaltimes(id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,"
+ " weekday VARCHAR(20) NOT NULL,"
+ "arrivaltime time NOT NULL,"
+ " stop_id INT, FOREIGN KEY fk_stop_id(stop_id) REFERENCES stops(stop_id) )" );