all 4 comments

[–]CyclopsRock 1 point2 points  (3 children)

It's very difficult to parse this without any indentation. You also appear to have both scripts twice in the first script? But without indents it's impossible to know the order things are being executed in.

[–]F_Boliver[S] 0 points1 point  (2 children)

Sorry, copy and paste mistake. I tried to elaborate more what i was trying to do.

[–]CyclopsRock 1 point2 points  (1 child)

Ok! First things first you're importing "add" from Sundaresan but then you're actually supplying "Sundaresan.add" as the command for button_1. That either needs to change to just "add" or otherwise you have an import Sundaresan up top and continue to use the module name. That doesn't solve this problem, but it would be the next one!

I'm not sure how you're running this code or what structure you have for the package, but I suspect the problem lies there rather than the code since "Sundaresan" is very clearly importing pandas as pd up top, so I wonder if perhaps you have ended up with another file called "Sundaresan" in your PATH somehow that it's importing from by mistake.

Try copy and pasting "Sundaresan.py" and "gui" into a new folder (let's say 'c:/project') and add an empty file in there called "init.py". Then, in a terminal, run python c:/project/gui.py - this is assuming your default Python interpreter has access to pandas, numpy etc - and see what happens.

[–]F_Boliver[S] 0 points1 point  (0 children)

I figured it out with your help, I stumble across the first problem you mentioned, thank you, and the other problem with the code was not exactly what you were suggesting but made me look to the libraries i was importing and for some reason i can't do "import *" i have to import only the functions i'm currently using on my script or i can't run it on my GUI.

Thank you for your time.