betfairlightweight (python wrapper)
hi...im trying to login with this, ive created and uploaded the proper certificates, they are in a folder 'certs' on the desktop.
When I try trading.login() i get the following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
(response, elapsed_time) = self.request(self.url, session=session)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
self._error_handler(response_data)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
raise self._error(response)
betfairlightweight.exceptions.LoginError: API login: CERT_AUTH_REQUIRED
followed the documentation very closely. any ideas?
When I try trading.login() i get the following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
(response, elapsed_time) = self.request(self.url, session=session)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
self._error_handler(response_data)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
raise self._error(response)
betfairlightweight.exceptions.LoginError: API login: CERT_AUTH_REQUIRED
followed the documentation very closely. any ideas?
What version are you running? Betfair recently updated the endpoints.sa7med wrote: ↑Wed Mar 20, 2019 6:51 pmhi...im trying to login with this, ive created and uploaded the proper certificates, they are in a folder 'certs' on the desktop.
When I try trading.login() i get the following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
(response, elapsed_time) = self.request(self.url, session=session)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
self._error_handler(response_data)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
raise self._error(response)
betfairlightweight.exceptions.LoginError: API login: CERT_AUTH_REQUIRED
followed the documentation very closely. any ideas?
i see, ill update nowLinusP wrote: ↑Wed Mar 20, 2019 7:46 pmWhat version are you running? Betfair recently updated the endpoints.sa7med wrote: ↑Wed Mar 20, 2019 6:51 pmhi...im trying to login with this, ive created and uploaded the proper certificates, they are in a folder 'certs' on the desktop.
When I try trading.login() i get the following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
(response, elapsed_time) = self.request(self.url, session=session)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
self._error_handler(response_data)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
raise self._error(response)
betfairlightweight.exceptions.LoginError: API login: CERT_AUTH_REQUIRED
followed the documentation very closely. any ideas?
Hi
I am trying to use this on a Windows 10 machine, i have created a folder C:\certs & put my .crt file in there, however when I run:
trading = betfairlightweight.APIClient(username=my_username,
password=my_password,
app_key=my_app_key,
certs=r'C:\certs')
I get the error:
betfairlightweight.exceptions.APIError: None
Params: None
Exception: Certificate folder not found in C:\certs
Process finished with exit code 1
Find it strange that is says 'Certificate folder not found' any ideas its driving me crazy !?
Cheers
I am trying to use this on a Windows 10 machine, i have created a folder C:\certs & put my .crt file in there, however when I run:
trading = betfairlightweight.APIClient(username=my_username,
password=my_password,
app_key=my_app_key,
certs=r'C:\certs')
I get the error:
betfairlightweight.exceptions.APIError: None
Params: None
Exception: Certificate folder not found in C:\certs
Process finished with exit code 1
Find it strange that is says 'Certificate folder not found' any ideas its driving me crazy !?
Cheers
Whats in the certs folder? It looks for .crt and .key:mtrend wrote: ↑Fri Apr 12, 2019 2:24 pmHi
I am trying to use this on a Windows 10 machine, i have created a folder C:\certs & put my .crt file in there, however when I run:
trading = betfairlightweight.APIClient(username=my_username,
password=my_password,
app_key=my_app_key,
certs=r'C:\certs')
I get the error:
betfairlightweight.exceptions.APIError: None
Params: None
Exception: Certificate folder not found in C:\certs
Process finished with exit code 1
Find it strange that is says 'Certificate folder not found' any ideas its driving me crazy !?
Cheers
https://github.com/liampauling/betfair/ ... nt.py#L150
Hi
I followed this:
https://docs.developer.betfair.com/disp ... n+With+XCA
Doesnt seem it lets you generate a .key file, Il see if I can do from the command prompt.
Cheers
I followed this:
https://docs.developer.betfair.com/disp ... n+With+XCA
Doesnt seem it lets you generate a .key file, Il see if I can do from the command prompt.
Cheers
mtrend wrote: ↑Fri Apr 12, 2019 2:24 pmHi
I am trying to use this on a Windows 10 machine, i have created a folder C:\certs & put my .crt file in there, however when I run:
trading = betfairlightweight.APIClient(username=my_username,
password=my_password,
app_key=my_app_key,
certs=r'C:\certs')
I get the error:
betfairlightweight.exceptions.APIError: None
Params: None
Exception: Certificate folder not found in C:\certs
Process finished with exit code 1
Find it strange that is says 'Certificate folder not found' any ideas its driving me crazy !?
Cheers
Not sure if this is the problem but i think you need a '\' after certs ie certs=r'C:\certs\')
Hi, i think i did all the cert steps correctly now however I get a different error.
error:
code:
I haven't seen this error and google has failed me. Any thoughts?
error:
File "C:\Users\...\betfairlightweight\endpoints\login.py", line 40, in request
raise APIError(None, exception='ConnectionError')
betfairlightweight.exceptions.APIError: None
Params: None
Exception: ConnectionError
code:
certs_path = r'certs'
my_username = "****"
my_password = '"****"
my_app_key = '"****"
trading = betfairlightweight.APIClient(username=my_username, password=my_password, app_key=my_app_key, certs=certs_path)
trading.login()
I haven't seen this error and google has failed me. Any thoughts?
sa7med I was just looking for something else and was directed to this chain..and noticed your post...you've probably fixed this long ago, but if someone else finds there way here wondering what the answer is..sa7med wrote: ↑Wed Mar 20, 2019 6:51 pmhi...im trying to login with this, ive created and uploaded the proper certificates, they are in a folder 'certs' on the desktop.
When I try trading.login() i get the following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
(response, elapsed_time) = self.request(self.url, session=session)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
self._error_handler(response_data)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
raise self._error(response)
betfairlightweight.exceptions.LoginError: API login: CERT_AUTH_REQUIRED
followed the documentation very closely. any ideas?
I had this error and the fix was to append the Two Step Auth code to your pass word in the Python program...(123456 below)
Also as a temp measure you can also use the program without the certs by replacing :
trading.Login()
With:
trading = betfairlightweight.APIClient('Yourusername', 'YourPassword123456', app_key='YourAppkey')
trading.login_interactive()
Probably I wouldn't leave it like this as its less secure
(by the way, Ive still very much got my Learner plates on with Python so hope Im not talking rubbish )
Regards
Peter
PS just a thought...if you do use the certs method, is this as safe as having two step in place? (I guess if you didn't have two step on and used certs, if someone were to hack into your system where the certs file was (And your username and password were integral within your code), it would be easy to breach your account?)
Last edited by PeterLe on Sun Dec 22, 2019 10:07 pm, edited 1 time in total.
Thanks for the update PeterLe. I remember I did resolve it although I don't quite remember how. Probably the issue was as you mentioned. it was a brief foray into the API stuff and I didn't really get very far with it all. The day to day just gets in the way. Nice to have your comment for future messing abouts as im sure I'll run into the same problem again!PeterLe wrote: ↑Sun Dec 22, 2019 10:02 pmsa7med I was just looking for something else and was directed to this chain..and noticed your post...you've probably fixed this long ago, but if someone else finds there way here wondering what the answer is..sa7med wrote: ↑Wed Mar 20, 2019 6:51 pmhi...im trying to login with this, ive created and uploaded the proper certificates, they are in a folder 'certs' on the desktop.
When I try trading.login() i get the following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
(response, elapsed_time) = self.request(self.url, session=session)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
self._error_handler(response_data)
File "C:\Python36\lib\site-packages\betfairlightweight\endpoints\login.
raise self._error(response)
betfairlightweight.exceptions.LoginError: API login: CERT_AUTH_REQUIRED
followed the documentation very closely. any ideas?
I had this error and the fix was to append the Two Step Auth code to your pass word in the Python program...(123456 below)
Also as a temp measure you can also use the program without the certs by replacing :
trading.Login()
With:
trading = betfairlightweight.APIClient('Yourusername', 'YourPassword123456', app_key='YourAppkey')
trading.login_interactive()
Probably I wouldn't leave it like this as its less secure
(by the way, Ive still very much got my Learner plates on with Python so hope Im not talking rubbish )
Regards
Peter
PS just a thought...if you do use the certs method, is this as safe as having two step in place? (I guess if you didn't have two step on and used certs, if someone were to hack into your system where the certs file was, it would be easy to breach your account?)