ovh/python-ovh

Low HTTP request failed error

dbadia opened this issue · 7 comments

Hi, trying to execute one of the examples but am getting an error.
I've gotten my key, secret key, and consumer key. Have endpoint=ovh-ca in my ovh.conf file along with the keys

Here's my code, config and the error I'm getting:

# to get your credentials
client = ovh.Client()
# Print nice welcome message
print "Welcome", client.get('/me')['firstname']

Error

INFO:ovh.vendor.requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): ca.api.ovh.com
Welcome
Traceback (most recent call last):
  File "hw.py", line 29, in <module>
    print "Welcome", client.get('/me')['firstname']
  File "/usr/local/lib/python2.7/dist-packages/ovh/client.py", line 319, in get
    return self.call('GET', _target, None, _need_auth)
  File "/usr/local/lib/python2.7/dist-packages/ovh/client.py", line 404, in call
    now = str(int(time.time()) + self.time_delta)
  File "/usr/local/lib/python2.7/dist-packages/ovh/client.py", line 197, in time_delta
    server_time = self.get('/auth/time', _need_auth=False)
  File "/usr/local/lib/python2.7/dist-packages/ovh/client.py", line 319, in get
    return self.call('GET', _target, None, _need_auth)
  File "/usr/local/lib/python2.7/dist-packages/ovh/client.py", line 422, in call
    raise HTTPError("Low HTTP request failed error", error)
ovh.exceptions.HTTPError: ('Low HTTP request failed error', SSLError(SSLError(IOError(2, 'No such file or directory'),),))

Hi @dbadia,

Thanks for reporting this issue. To help diagnose, can you give me your version of python-ovh (current is 0.4.1), operating system version, python version and paste the output of this snippet?

import ovh
client = ovh.Client("ovh-ca")
print client.get("/auth/time",  _need_auth=False))

Thanks!

I get the same "Low http request failed" error with every api call that I try to run. So I tried your snippet and get the same http request error.
I'm running OS X El Capitan. ovh version 0.4.1 and python 2.7.10 in the latest version of virtualenv
low http request error.txt

I typed this up on friday, but forgot to send it :)

I ran pip install ovh yesterday

Debian jessie

Python 2.7.9 (default, Mar 1 2015, 12:57:24)
[GCC 4.9.2] on linux2

Ran your snippit, here's what I got

dave@jj:/ovhpy$ python test.py
Traceback (most recent call last):
File "test.py", line 3, in
print client.get("/auth/time", _need_auth=False)
File "/usr/local/lib/python2.7/dist-packages/ovh/client.py", line 319, in
get
return self.call('GET', _target, None, _need_auth)
File "/usr/local/lib/python2.7/dist-packages/ovh/client.py", line 422, in
cal
l
raise HTTPError("Low HTTP request failed error", error)
ovh.exceptions.HTTPError: ('Low HTTP request failed error',
SSLError(SSLError(I
OError(2, 'No such file or directory'),),))
dave@jj:
/ovhpy$ python test.py
Traceback (most recent call last):
File "test.py", line 3, in
print client.get("/auth/time", _need_auth=False)
File "/usr/local/lib/python2.7/dist-packages/ovh/client.py", line 319, in
get
return self.call('GET', _target, None, _need_auth)
File "/usr/local/lib/python2.7/dist-packages/ovh/client.py", line 422, in
call
raise HTTPError("Low HTTP request failed error", error)
ovh.exceptions.HTTPError: ('Low HTTP request failed error',
SSLError(SSLError(IOError(2, 'No such file or directory'),),))

On Fri, Apr 8, 2016 at 10:38 AM, Jean-Tiare Le Bigot <
notifications@github.com> wrote:

Hi @dbadia https://github.com/dbadia,

Thanks for reporting this issue. To help diagnose, can you give me your
version of python-ovh (current is 0.4.1), operating system version, python
version and paste the output of this snippet?

import ovh
client = ovh.Client("ovh-ca")print client.get("/auth/time", _need_auth=False))

Thanks!


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#23 (comment)

Arghhhh. Python packaging....

This is caused by https://github.com/ovh/python-ovh/blob/master/ovh/vendor/requests/cacert.pem being missing in the package. I'll fix this ASAP.

In the mean time, you can manually grab it by running

wget https://raw.githubusercontent.com/ovh/python-ovh/master/ovh/vendor/requests/cacert.pem -O $(dirname $(python -c 'import ovh; print ovh.__file__'))/vendor/requests/cacert.pem

That should fix it for now.

That worked, thanks!

On Sun, Apr 10, 2016 at 6:58 PM, Jean-Tiare Le Bigot <
notifications@github.com> wrote:

Arghhhh. Python packaging....

This is caused by
https://github.com/ovh/python-ovh/blob/master/ovh/vendor/requests/cacert.pem
being missing in the package. I'll fix this ASAP.

In the mean time, you can manually grab it by running

wget https://raw.githubusercontent.com/ovh/python-ovh/master/ovh/vendor/requests/cacert.pem -O $(dirname $(python -c 'import ovh; print ovh.file'))/vendor/requests/cacert.pem

That should fix it for now.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#23 (comment)

Thank you for the quick fix

This is fixed. Version 0.4.2 released. Please run pip install -U ovh to get the latest version.