Forums

Get proxy error "Cannot connect to proxy.', error('Tunnel connection failed: 403 Forbidden',)))"

Hi! I run my script from my local PC and donĀ“t have any error. But when I run from BashConsole or via schedule task the error trace is:

Traceback (most recent call last): File "finance_start.py", line 151, in <module> "iol": getIolPortfolio(), #https://api.invertironline.com/Help File "finance_start.py", line 55, in getIolPortfolio token = iol.login() File "/home/adriezemartinez/pyfinance/ioljson.py", line 14, in login r = requests.post(url, data=payload, headers=headers) File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 111, in post return request('post', url, data=data, json=json, kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 57, in request return session.request(method=method, url=url, kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 475, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 585, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 465, in send raise ProxyError(e, request=request) requests.exceptions.ProxyError: HTTPSConnectionPool(host='api.invertironline.com', port=443): Max retries exceeded with url: /token (Caused by ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 403 Forbidden',)))

Any suggestion?

Thanks :D

http://help.pythonanywhere.com/pages/403ForbiddenError

Thanks harry!!!!

How can add "api.invertironline.com" to whitelist?

If you send us a link to the API documentation, we should be able to add it.

Great! Do you have the email address?

I don{t see it in http://help.pythonanywhere.com/pages/RequestingWhitelistAdditions/

Thanks!!!

The API documentation is: https://api.invertironline.com/

I use all the services in the list :D

Thanks!!!!