Wiredcraft / dopy

Digital Ocean Python
MIT License
95 stars 62 forks source link

RuntimeError: Can't connect to HTTPS URL because the SSL module is not available. #30

Open OdinsHat opened 9 years ago

OdinsHat commented 9 years ago

This error occurs on OSX 10.10.4 (Yosemite) using Python 2.7.7

The full stack trace is:

Traceback (most recent call last):
  File "./digital_ocean.py", line 440, in <module>
    DigitalOceanInventory()
  File "./digital_ocean.py", line 225, in __init__
    self.load_from_digital_ocean('droplets')
  File "./digital_ocean.py", line 322, in load_from_digital_ocean
    self.data['droplets'] = self.manager.all_active_droplets()
  File "/Library/Python/2.7/site-packages/dopy/manager.py", line 30, in all_active_droplets
    json = self.request('/droplets/')
  File "/Library/Python/2.7/site-packages/dopy/manager.py", line 424, in request
    resp = self.request_v2(url, params=params, headers=headers, method=method)
  File "/Library/Python/2.7/site-packages/dopy/manager.py", line 475, in request_v2
    raise RuntimeError(e)
RuntimeError: Can't connect to HTTPS URL because the SSL module is not available.
zbal commented 8 years ago

Are you sure this is not an error of requests itself or your system not having the ssl library available? Can you run the following without exception being thrown?

python -c "import requests; a = requests.get('https://github.com'); print len(a.text);"