Python ile PyQt5 de kullanıcı adı hatası

    def baglanti_olustur(self):
        baglanti = sqlite3.connect('data.db')
        self.cursor = baglanti.cursor()
        self.cursor.execute('Create Table If not exists uyeler (kullanici_adi TEXT, parola TEXT)')
        baglanti.commit()

    def init_ui(self):
        self.kullanici_adi = QtWidgets.QLineEdit()
        self.parola = QtWidgets.QLineEdit()
        self.parola.setEchoMode(QtWidgets.QLineEdit.Password)
        self.giris = QtWidgets.QPushButton('Giriş Yap')
        self.yazi_alani = QtWidgets.QLabel('')

        v_box = QtWidgets.QVBoxLayout()
        v_box.addWidget(self.kullanici_adi)
        v_box.addWidget(self.parola)
        v_box.addWidget(self.yazi_alani)
        v_box.addStretch()
        v_box.addWidget(self.giris)

        h_box = QtWidgets.QHBoxLayout()
        h_box.addStretch()
        h_box.addLayout(v_box)
        h_box.addStretch()

        self.setLayout(h_box)
        self.setWindowTitle('Kullanıcı Girişi')
        self.giris.clicked.connect(self.login)
        self.show()

    def login(self):
        adi = self.kullanici_adi.text()
        par = self.parola.text()
        self.cursor.execute('Select * From uyeler where kullanici_adi = ? and parola = ?', (adi, par))
        data = self.cursor.fetchall()
        if len(data) >= 1:
            self.yazi_alani.setText('Giriş işlemi başarılı.\nHoşgeldiniz ' + adi)
        else:
            self.yazi_alani.setText('Böyle bir kullanıcı yok\nLütfen tekrar deneyin.')

Burda popup arayüzü çağrılıyor ama her kullanıcı adı ve parolayı (string ve integer) olarak sırayla girmeme rağmen sadece son kodu (else kısmını) çalıştırıyor. Nereyi kaçırdım? Ne olur ne olmaz kodun % 80 inini paylaştım. Fazla derine girmeden pls…

1

Kod bende düzgünce çalıştı, database dosyanda kullanici_adi ve parola değerlerini kontrol eder misin? DB Browser ile grafiksel arayüz ile de yapabilirsin.

bende de çalıştı öncekinde neden çalışmadı çözemedim.