Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Python Programming Language

I don't quite understand this error...


> Thus far, everything works fine unless I'm trying the Deposit or Withdrawal
> functions. (I know they're different, but both give roughly the same error.)
> Whenever I attempt one of these functions I get the following error message:

> Exception in Tkinter callback
> Traceback (most recent call last):
>   File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
>     return self.func(*args)
>   File "C:\Python24\AEOpaypal.py", line 27, in Deposit
>     user, passw, balance = accountlist[whichSelected()]
>   File "C:\Python24\AEOpaypal.py", line 11, in whichSelected
>     return int(select.curselection()[0])
> IndexError: tuple index out of range

"IndexError: tuple index out of range" means that you are trying to
access an element of a tuple which does not exist. In your case
int(select.curselection()[0]) raises the exception so your tuple
select.curselection() doesn't have a 0th entry which means it's empty.

HTH,
Daniel

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc