Re: Threading KeyError in Python 3.3 beta 2?

Discussion in 'Python' started by Chris Angelico, Aug 13, 2012.

  1. On Mon, Aug 13, 2012 at 8:36 PM, Blind Anagram <> wrote:
    > I thought I would try out Python 3.3 beta 2.
    > This works well so far but I keep getting the message:
    >
    > Exception KeyError: KeyError(6308,) in <module 'threading' from
    > 'c:\\Program Files\\Python33\\lib\\threading.py'> ignored
    >
    > after some of my python code completes.
    > Is this an issue worth reporting?


    It might be, but it depends on what your code is and is doing. Can you
    put together a minimal test case?

    ChrisA
    Chris Angelico, Aug 13, 2012
    #1
    1. Advertising

  2. On Mon, 13 Aug 2012 12:24:55 +0100, Blind Anagram wrote:

    > Here is a fairly short bit of code which produces the exception:
    >
    > for pre in ('12', '13', '14', '15', '21' ):
    > n = int(pre + '543')
    > s = str(n * n)
    > if len(set(s)) == 9:
    > print(n, s)



    Um, I don't think so.


    >>> for pre in ('12', '13', '14', '15', '21' ):

    .... n = int(pre + '543')
    .... s = str(n * n)
    .... if len(set(s)) == 9:
    .... print(n, s)
    ....
    12543 157326849



    Since your code doesn't even import threading, let alone use it, I can't
    imagine how you get an error in threading.


    --
    Steven
    Steven D'Aprano, Aug 13, 2012
    #2
    1. Advertising

  3. On Mon, Aug 13, 2012 at 9:24 PM, Blind Anagram <> wrote:
    >
    > Here is a fairly short bit of code which produces the exception:
    >
    > for pre in ('12', '13', '14', '15', '21' ):
    > n = int(pre + '543')
    > s = str(n * n)
    > if len(set(s)) == 9:
    > print(n, s)


    Interesting. I just downloaded a clean 3.3 onto this Windows box,
    saved your script to a file ("booom.py" hehe), and ran it - no
    exception. Same thing pasting that code into the interactive
    interpreter or idle. Did you import anything before running that code?
    If not, it may be a site.py problem or something.

    ChrisA
    Chris Angelico, Aug 13, 2012
    #3
  4. On Mon, Aug 13, 2012 at 9:38 PM, Steven D'Aprano
    <> wrote:
    > Since your code doesn't even import threading, let alone use it, I can't
    > imagine how you get an error in threading.


    Hey, I try not to get scornful until at least the sixth post :)

    ChrisA
    Chris Angelico, Aug 13, 2012
    #4
  5. On Mon, Aug 13, 2012 at 9:51 PM, Blind Anagram <> wrote:
    > Thanks to you both for your responses.
    >
    > Its an IDE issue of some kind (I am using WING).
    >
    > When I run under a command prompt (or IDLE) all is well.


    Next time, do mention that sort of environmental consideration in the
    original post :)

    As a general rule, be careful of threading and windowing toolkits;
    quite a few of them have restrictions on what you can and can't do, or
    even completely do not support threads.

    ChrisA
    Chris Angelico, Aug 13, 2012
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Norman Shelley
    Replies:
    0
    Views:
    277
    Norman Shelley
    Oct 11, 2003
  2. Ajay
    Replies:
    5
    Views:
    583
    Uche Ogbuji
    Sep 12, 2004
  3. Guest

    KeyError

    Guest, Dec 15, 2004, in forum: Python
    Replies:
    1
    Views:
    1,872
    Diez B. Roggisch
    Dec 15, 2004
  4. nyenyec
    Replies:
    3
    Views:
    1,021
    Duncan Booth
    Jan 7, 2007
  5. Robert Gliguroski

    Python KeyError

    Robert Gliguroski, Sep 5, 2013, in forum: Python
    Replies:
    1
    Views:
    143
    Ethan Furman
    Sep 6, 2013
Loading...

Share This Page