Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread Thread-1 (most likely raised during interpreter shutdown #141

Open
GnunuX opened this issue Jun 4, 2015 · 0 comments
Labels

Comments

@GnunuX
Copy link

GnunuX commented Jun 4, 2015

I wrote a simple script, which connect to a local cherrypy website with persistent session.

#!/usr/bin/python
from time import sleep

import restkit
uri = 'http://127.0.0.1:8000/'
method = 'GET'
ret = restkit.request(uri, method=method)
print ret.body_string()
sleep(1)

But some requests ends with unexpected traceback:

python test.py
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
  File "/usr/lib/python2.7/dist-packages/socketpool/backend_thread.py", line 51, in run
  File "/usr/lib/python2.7/dist-packages/socketpool/pool.py", line 88, in murder_connections
  File "/usr/lib/python2.7/dist-packages/socketpool/backend_thread.py", line 30, in __next__
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'Empty'

If a add "ret.should_close = True" before call to 'body_string', there is no more error.

ubuntu: Ubuntu 14.04.2 LTS
ubuntu package python-restkit: 4.2.2-1
ubuntu package python-socketpool: 0.5.3-1

Regards,

@benoitc benoitc added the Bug label Jun 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants