I want to make sure that when a person does not drive anything into a string, it gives an error. Help, how can I do this? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

I want to make sure that when a person does not drive anything into a string, it gives an error. Help, how can I do this?

def rasp(): save = {} save = title_login.get() doc = open("login.txt", "wb") pickle.dump(save, doc) doc.close() doc = open("login.txt", "rb") doc_op = pickle.load(doc) if title_login.get() == "": messagebox.showerror("Ошибка!") messagebox.showerror_frame = Frame(rasp, bg='white') messagebox.showerror_frame.pack() messagebox.showerror(messagebox.showerror_frame, text='Введите имя!,', bg='white', font=40) frame = Frame(reg, bg='pink') frame.place(relx=0.05, rely=0.05, relwidth=0.9, relheight=0.9) title = Label(frame, text='{}, вот ваше расписание!:'.format(urName.get()), bg='purple') title.place(relx=0.2, rely=0.2, relwidth=0.2, relheight=0.1) title.pack()

12th May 2021, 4:11 PM
Алина Золотова
Алина Золотова - avatar
2 Antworten
0
Provide full code this part is not enough. To share code firstly go to code section make a new code, paste your code. And then share the code link in the question
13th May 2021, 3:08 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 1
I solved my problem
13th May 2021, 3:09 PM
Алина Золотова
Алина Золотова - avatar