On 06/16/2010 11:06 PM, madhuri vio wrote: > def h(self,event): > handle = open("myco.fasta","r") > for seq_record in SeqIO.parse(handle, "fasta"): > messenger_rna = coding_myco.fasta.transcribe() > han1 = open("mycorna.fasta","wU") > han1.close() > return self.messenger_rna > > > the error is... > > File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1413, in __call__ > return self.func(*args) > TypeError: h() takes exactly 2 arguments (0 given) > > ia m unable to debug...i am stuck
You will have to provide more code than this. The traceback error you are getting is coming from Tk's event loop when it tries to execute your callback. Your callback is defined as having two parameters, but whatever is calling it from within Tk is expecting it to have no parameters. Without seeing a complete (but minimal!) code example that folks can run on their own computers and replicate your problem, there's no way for any of us to help you debug your code. Given the nature of your queries, I assume your are most likely in academia, doing bioinformatics research. You would be wise to seek out help from a computer science student or professor. In fact you're likely to receive more help by doing that than from this mailing list, at least at this stage. In your next post, please do at least the following things: 1. Make the e-mail subject clear, precise, and descriptive. "basic doubt" or "gui doubt" is *simply not acceptable*. Instead you might say, "How can I run a function when I click a button in Tk?" or "What does this traceback mean?" 2. Post enough code so that someone can cut and paste it and run it through python to duplicate your error. If you don't, I'm afraid that 95% of the list members are going to silently delete your e-mails, which will no doubt cause you much frustration. Many have already blocked your e-mail address. -- http://mail.python.org/mailman/listinfo/python-list