TypeError: can only concatenate str (not “function”) to str?
ich möchte eine ui für mailtm erstellen aber bekomme kein output raus also wenn email ankommen werden sie nicht angezeigt und wenn ich listener eingebe bekomme ich jedes mal den gleichen fehler code
Fehler code:
TypeError: can only concatenate str (not “function”) to str
from mailtm import *
def listener(message):
print("\nSubject: " + message['subject'] + str(listener))
print("Content: " + message['text'] if message['text'] else message['html'] + str(listener))
test = Email()
print("\nDomain: " + test.domain)
test.register()
print("\nEmail Adress: " + str(test.address))
test.start(listener, interval=3)
print("\nHab Sabr.....")
main = ctk.CTk()
main.geometry("500x320")
main.title("Temp mail By Amjn")
emaila = ctk.CTkEntry(main, placeholder_text=" " + test.address, width=900, font=("Helvetica", 20))
emaila.configure(state="readonly")
emaila._corner_radius = 10
emaila.pack()
Copyt = ctk.CTkLabel(main, text="Copy Email", font=("Helvetica", 20))
Copyt.pack()
def neuw(self=None):
neu = ctk.CTkToplevel(main)
neu.title("Emails (MADE BY AMJN)")
neu.geometry("500x320")
neu.corner_radius = 30
neu.resizable(width=True, height=True)
Ausg = ctk.CTkEntry(neuw, placeholder_text=(" ") + listener, width=900, font=("Helvetica", 20))
Ausg.pack()
knopf = ctk.CTkButton(main, text="Emails", font=("Helvetica", 20), command=neuw)
knopf.pack(pady=20)
main.mainloop()
This is the line:
listing is a function (which, in addition, even if you would call it at this point) None but also only if you pass exactly one parameter to them).
And also within this function there are some references on listingthat make no sense.
thanks for the answer what could I do instead of lister I want to get the output of dev lister Show how would I do that better what would they do?
The (or at least something in the way):
Thanks very nice,
thanks for their time and help.
You did not specify in which line the error is but I guess this is the problem here:
listener is not a string, but you manage the function like a string
By the way, the clamps by ” are superfluous.
thanks for the answer what could I do instead of lister I want to get the output of dev lister Show how would I do that better what would they do? thanks for the answer what could I do instead of lister I want to get the output of dev lister Show how would I do that better what would they do?