-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Not sure why, but probably related to #43. I'm on 0.7.0
See these sequence of commands:
In [1]: import requests; requests.get('https://google.com')
Out[1]: <Response [200]>
In [2]: import graphitesend
In [3]: import requests; requests.get('https://google.com')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/Users/leonsas/Projects/Hypnos/hypnos/sleep_plan/plan_review.pyc in <module>()
----> 1 import requests; requests.get('https://google.com')
/usr/local/lib/python2.7/site-packages/requests/api.pyc in get(url, **kwargs)
63
64 kwargs.setdefault('allow_redirects', True)
---> 65 return request('get', url, **kwargs)
66
67
/usr/local/lib/python2.7/site-packages/requests/api.pyc in request(method, url, **kwargs)
47
48 session = sessions.Session()
---> 49 response = session.request(method=method, url=url, **kwargs)
50 # By explicitly closing the session, we avoid leaving sockets open which
51 # can trigger a ResourceWarning in some cases, and look like a memory leak
/usr/local/lib/python2.7/site-packages/opbeat/instrumentation/packages/base.pyc in __call__(self, *args, **kwargs)
61 self._self_method,
62 self.__wrapped__, self._self_instance,
---> 63 args, kwargs)
64
65 else:
/usr/local/lib/python2.7/site-packages/opbeat/instrumentation/packages/base.pyc in call_if_sampling(self, module, method, wrapped, instance, args, kwargs)
218 def call_if_sampling(self, module, method, wrapped, instance, args, kwargs):
219 if not get_transaction():
--> 220 return wrapped(*args, **kwargs)
221 else:
222 return self.call(module, method, wrapped, instance, args, kwargs)
/usr/local/lib/python2.7/site-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
459 }
460 send_kwargs.update(settings)
--> 461 resp = self.send(prep, **send_kwargs)
462
463 return resp
/usr/local/lib/python2.7/site-packages/requests/sessions.pyc in send(self, request, **kwargs)
571
572 # Send the request
--> 573 r = adapter.send(request, **kwargs)
574
575 # Total elapsed time of the request (approximately)
/usr/local/lib/python2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies)
368 decode_content=False,
369 retries=self.max_retries,
--> 370 timeout=timeout
371 )
372
/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.pyc in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, **response_kw)
516 httplib_response = self._make_request(conn, method, url,
517 timeout=timeout,
--> 518 body=body, headers=headers)
519
520 # If we're going to release the connection in ``finally:``, then
/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.pyc in _make_request(self, conn, method, url, timeout, **httplib_request_kw)
320 # Trigger any extra validation we need to do.
321 try:
--> 322 self._validate_conn(conn)
323 except (SocketTimeout, BaseSSLError) as e:
324 # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout.
/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.pyc in _validate_conn(self, conn)
725 # Force connect early to allow us to validate the connection.
726 if not getattr(conn, 'sock', None): # AppEngine might not have `.sock`
--> 727 conn.connect()
728
729 if not conn.is_verified:
/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connection.pyc in connect(self)
236 ca_certs=self.ca_certs,
237 server_hostname=hostname,
--> 238 ssl_version=resolved_ssl_version)
239
240 if self.assert_fingerprint:
/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.pyc in ssl_wrap_socket(sock, keyfile, certfile, cert_reqs, ca_certs, server_hostname, ssl_version, ciphers, ssl_context)
251 context.load_cert_chain(certfile, keyfile)
252 if HAS_SNI: # Platform-specific: OpenSSL with enabled SNI
--> 253 return context.wrap_socket(sock, server_hostname=server_hostname)
254 return context.wrap_socket(sock)
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.pyc in wrap_socket(self, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname)
351 suppress_ragged_eofs=suppress_ragged_eofs,
352 server_hostname=server_hostname,
--> 353 _context=self)
354
355 def set_npn_protocols(self, npn_protocols):
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.pyc in __init__(self, sock, keyfile, certfile, server_side, cert_reqs, ssl_version, ca_certs, do_handshake_on_connect, family, type, proto, fileno, suppress_ragged_eofs, npn_protocols, ciphers, server_hostname, _context)
598 if timeout == 0.0:
599 # non-blocking
--> 600 raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")
601 self.do_handshake()
602
ValueError: do_handshake_on_connect should not be specified for non-blocking sockets
In [4]:
Metadata
Metadata
Assignees
Labels
No labels