Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > Python

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-02-2009, 05:52 PM   PM User | #1
ADZZZ
New to the CF scene

 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ADZZZ is an unknown quantity at this point
KeyError Plus Other Issues

Hello,

I do not specifically know Python, but I have a rather good grasp of programming in general, but today i am left scratching my head.

I have a script that I have grabbed that essentially logs into my asterisk server, listens to events and then pushes them into mysql database.

I am getting the following error:

Code:
[root@sipsrv03 events]# ./ProxyMan.py
[root@sipsrv03 events]# Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.4/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.4/threading.py", line 638, in __exitfunc
    self._Thread__delete()
  File "/usr/lib/python2.4/threading.py", line 522, in __delete
    del _active[_get_ident()]
KeyError: -1208293696
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.4/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.4/threading.py", line 638, in __exitfunc
    self._Thread__delete()
  File "/usr/lib/python2.4/threading.py", line 522, in __delete
    del _active[_get_ident()]
KeyError: -1208293696
I can provide the code if necessary.

Thank you so much for any assistance you may be able to send my way!
ADZZZ is offline   Reply With Quote
Old 05-28-2009, 05:22 PM   PM User | #2
shedokan
Regular Coder

 
Join Date: Oct 2007
Posts: 277
Thanks: 2
Thanked 4 Times in 4 Posts
shedokan has a little shameless behaviour in the past
I learned a little python for making an app engine app, but i think I can help you.

keyerror means that that key doesn't exists in a list or an array.

if you are using lists the use hasattr(list, 'keyname').

can I ask what are you trying to do? add a new key to an array? or what?
__________________
Shedokan - Free Online Games
shedokan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:22 PM.


Advertisement
Log in to turn off these ads.