Skip to content

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

Description

@GnunuX

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,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions