python 3.x - tkinter attribute error in imported module -


i trying create tinter gui in use 6 imported self-written modules.i have linked 2 modules button , combine output each output in label field. these 2 modules identical ( bad practice, know) except source of data use. output called module_name.function_def(), 1 module keep on getting :

attributeerror: 'module' object has no attribute 'function_def' 

if open module , load idle, opens tinter gui ( not sure why) , gui functions should i.e. clicking button displays expected results in label field how should investigate problem?

the first rule of debugging assume error message telling truth. if getting 'module' object has no attribute 'function_def' must believe true statement. means either a) module doesn't have attribute, or b) module isn't think is.

a simple first step add print statement print out module is, before call module.function_def(). you'll surprised returns.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -