GithubHelp home page GithubHelp logo

All queries fail with SSLError about ads HOT 8 CLOSED

andycasey avatar andycasey commented on May 25, 2024
All queries fail with SSLError

from ads.

Comments (8)

vsudilov avatar vsudilov commented on May 25, 2024

Cannot repro in python 2.7.12 on ubuntu16, latest develop code, hitting live endpoint:

In [10]: q = ads.SearchQuery(q="star")

In [11]: list(q)[0].title
Out[11]: [u'Direct photon measurement in proton-proton and deuteron-gold collisions']

However, using the same commands above after import ads.sandbox as ads produces SSLError: ("bad handshake: SysCallError(32, 'EPIPE')",)

from ads.

tiagopereira avatar tiagopereira commented on May 25, 2024

Forgot to add that the above was on a Mac. I just checked again in Linux and I get the same SSLError as @vsudilov . Indeed it seems only the sandbox is broken (earlier I got the same SSLErorr also on ads.SearcQuery, but now it seems to be working...

from ads.

vsudilov avatar vsudilov commented on May 25, 2024

I think this is related to ADS updating their certs recently and some interaction with local cert stores; Cannot repro in a vanilla ubuntu docker container.

import ads.sandbox as ads
q = ads.SearchQuery(q="star")
list(q)[0].title
[u"Cyclic Adenosine 3',5'-Monophosphate during Glucose Repression in the Rat Liver"]

from ads.

jonnybazookatone avatar jonnybazookatone commented on May 25, 2024

I confirm my Mac also fails for the latest build. Rolling back requests to requests==2.11.1 makes it work again. Not sure why atm....

from ads.

jonnybazookatone avatar jonnybazookatone commented on May 25, 2024

Fails for sandbox, not live.

from ads.

jonnybazookatone avatar jonnybazookatone commented on May 25, 2024

I had a quick look, it seems there is an SSL issue somewhere in HTTPretty:

>>> import requests
>>> import HTTPretty as hp
>>> hp.enable()
>>> hp.register_uri(hp.GET, 'https://foo.com', body='''{"return": "success"}''')
>>> requests.get('https://foo.com').json()   
....
    495         except (_SSLError, _HTTPError) as e:
    496             if isinstance(e, _SSLError):
--> 497                 raise SSLError(e, request=request)
    498             elif isinstance(e, ReadTimeoutError):
    499                 raise ReadTimeout(e, request=request)

SSLError: ('bad handshake: WantWriteError()',)

It may be related to this issue: gabrielfalcao/HTTPretty#242 but I didn't dig too deep. There is a PR open to fix this, but they're waiting on gabrielfalcao to merge it.

from ads.

vsudilov avatar vsudilov commented on May 25, 2024

Closing; if this is on-going we can investigate more

from ads.

jonnybazookatone avatar jonnybazookatone commented on May 25, 2024

Seems fine for me on Mac OS, python2.7, python3.5 and Linux python2.7, python3.4.

from ads.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.