Giter Club home page Giter Club logo

Comments (7)

koalalorenzo avatar koalalorenzo commented on July 28, 2024

That is interesting and I like the Idea of handling these. Would you like to have a solution like:

  • Check for empty answers, if so, throw an error
  • Allow users to specify a custom timeout.

What do you think?

from python-digitalocean.

giavjeko avatar giavjeko commented on July 28, 2024

Seems good, user should be able to specify a custom timeout.

Also, I think that Action.wait() method should take additional argument allowing user to specify how many request failures to tolerate before throwing an error.

from python-digitalocean.

jhallard avatar jhallard commented on July 28, 2024

Did this ever get solved? Frequently my scripts will freeze during the ssl handshake and never throw a timeout exception. Is there a way to set the timeout on get_all_droplets() for instance?

from python-digitalocean.

jhallard avatar jhallard commented on July 28, 2024

Here's the stack trace for where it freezes, sometimes my set of unit tests will complete in 5 seconds but mostly it just freezes while retrieving the current snapshots or droplets.

  File "/usr/lib/python2.7/site-packages/requests/api.py", line 69, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 50, in request
    response = session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 370, in send
    timeout=timeout
  File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
    body=body, headers=headers)
  File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 341, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 761, in _validate_conn
    conn.connect()
  File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/connection.py", line 238, in connect
    ssl_version=resolved_ssl_version)
  File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py", line 279, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python2.7/ssl.py", line 352, in wrap_socket
    _context=self)
  File "/usr/lib/python2.7/ssl.py", line 579, in __init__
    self.do_handshake()
  File "/usr/lib/python2.7/ssl.py", line 808, in do_handshake
    self._sslobj.do_handshake()

from python-digitalocean.

koalalorenzo avatar koalalorenzo commented on July 28, 2024

@jhallard I think your problem could be similar to #109 ! Can you check that?
It seems an SSL problem, not python-digitalocean... but I would like to be sure :-)

from python-digitalocean.

koalalorenzo avatar koalalorenzo commented on July 28, 2024

@jhallard could you open a new ticket in case this problem is still occurring? I think it is not related to python-digitalocean! Check the SSL/certificates!

from python-digitalocean.

koalalorenzo avatar koalalorenzo commented on July 28, 2024

Closing due to inactivity... The problem probably was not related to python-digitalocean. In case feel free to re-open.

from python-digitalocean.

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.