Python Forum
Where is the error? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Where is the error? (/thread-10884.html)



Where is the error? - MRX - Jun-12-2018

hello, i just wanna complete my program. But i don't know where the problem is...
i am using python 3.4.4
can u help me, please...

below is the code :

#try entry
#maked by MRX

#making frame
from tkinter import *
import messagebox
#message in messagebox
def hi():
    messagebox.showinfo('login', 'you have succes to login!')
a = Tk()
a.title("Login")

#making the contents
b = Frame(a)
Label(b, text='LOGIN').pack()
Label(b, text='name').pack(side=LEFT)
Entry(b, width=50).pack(side=LEFT)
Label(b, text='password').pack(side=LEFT)
Entry(b, width=50).pack(side=LEFT)
Button(b, text='login', command=hi).pack(side=RIGHT)
b.pack(fill=BOTH, expand=YES)

mainloop()
and when i run the code, it will display this:

Error:
Traceback (most recent call last): File "C:\Users\User\Desktop\tester\gamelogin+messagebox.py", line 6, in <module> import messagebox ImportError: No module named 'messagebox'
but, i have module named messagebox in my computer
thank you


RE: Where is the error? - buran - Jun-12-2018

(Jun-12-2018, 04:33 AM)MRX Wrote: i have module named messagebox in my computer

but is it in such location (path) so that it can be discovered during the import? :-)