Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '*not*': 0.07; 'indexing': 0.07; 'indices': 0.07; 'indicates': 0.09; 'received:67.192': 0.09; 'received:67.192.241': 0.09; 'received:dfw.emailsrvr.com': 0.09; 'itself.': 0.14; 'develop.': 0.16; 'integer,': 0.16; 'integers,': 0.16; 'ought': 0.16; 'subject:buttons': 0.16; 'typeerror:': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'header:User-Agent:1': 0.23; 'error': 0.23; 'helper': 0.24; 'received:emailsrvr.com': 0.24; '(or': 0.24; 'received:(smtp server)': 0.26; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'container': 0.31; 'gary': 0.31; 'something': 0.35; 'case,': 0.35; 'but': 0.35; 'really': 0.36; 'changing': 0.37; 'list': 0.37; 'to:addr:python-list': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'read': 0.60; 'easy': 0.60; 'you.': 0.62; 'email addr:gmail.com': 0.63; 'such': 0.63; 'needing': 0.65; 'worth': 0.66; 'not...': 0.84 X-Virus-Scanned: OK Date: Sun, 05 Jan 2014 11:51:48 -0800 From: Gary Herron User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: gotta love radio buttons References: <8dca57e8-8258-4020-9788-987af332b5b2@googlegroups.com> <1dffaef8-ba59-4bbf-b8ac-02c611640f92@googlegroups.com> In-Reply-To: <1dffaef8-ba59-4bbf-b8ac-02c611640f92@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1388951520 news.xs4all.nl 2902 [2001:888:2000:d::a6]:42941 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63216 On 01/05/2014 10:47 AM, eneskristo@gmail.com wrote: > Now it is giving me this error, after changing to helper = var[r.get()] > line 27, in submit_data > self.something_else[r][1] += 1 > TypeError: list indices must be integers, not IntVar In such an easy case, you really ought to be able to read the error and understand it rather than needing to rely on us to do that for you. The message: List indices must be integers, not IntVar clearly indicates you are indexing a list with something of type IntVar instead of the required int. That would have to be the ...[r]. The value of r is *not* an integer, it's an IntVar which is container of an int but not an int itself. You can access the contained int with r.get(), so perhaps ...[r.get()] is what you want. (Or perhaps not... We really don't know what you are trying to do here.) Reading error messages and understanding tracebacks are skills well worth trying to develop. Good luck. Gary Herron