How do I access a dictionary database in Python Tkinter for usernames and passwords?
the problem is that the keys and values in the database are being converted to bytes
objects:
db=dbm.open('M:\\Python\\Typing Program\\Dictionary.db','c')db['Mistap']='steefjabz'print(dict(db))#output: notice the b'' prefix{b'Mistap': b'steefjabz'}
I added .encode()
to convert the strings from the entry to bytes
like this:
username=self.usernameentry.get().encode() password=self.passwordentry.get().encode()
and instead of saying I had invalid credentials raised an error for having no attribute called show_frame
(the method is defined as ShowFrame
)