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

'_thread._local' object has no attribute 'session' #533

Closed
andreage opened this issue Jan 30, 2019 · 2 comments · Fixed by #534
Closed

'_thread._local' object has no attribute 'session' #533

andreage opened this issue Jan 30, 2019 · 2 comments · Fixed by #534

Comments

@andreage
Copy link

andreage commented Jan 30, 2019

Since version 2.20.1 I get the following error when I call stripe.Source.retrieve (or any other function):

File "VIRTUALENV_PATH/lib/python3.5/site-packages/stripe/http_client.py" in request
211. result = self._thread_local.session.request(

During handling of the above exception ('_thread._local' object has no attribute 'session'), another exception occurred:

[...]

File "VIRTUALENV_PATH/lib/python3.5/site-packages/stripe/http_client.py" in _handle_request_error
288. raise error.APIConnectionError(msg, should_retry=should_retry)

Going back to 2.20.0 works. Trying it from a Python shell works.

Stripe Python library: 2.20.1
Python: 3.5.3
requests: 2.21.0
Apache/2.4.25 (Debian) w. WSGI

@ob-stripe
Copy link
Contributor

Hi @andreage, thanks for the report. I've managed to reproduce the issue, we should have a fix out promptly!

@brandur-stripe
Copy link
Contributor

Sorry about the trouble here and thanks for reporting. We've released a fix in 2.20.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants