Hi,
I was able to solve the problem with module mechanize (‘pip install’ function in the end). Now, the problem is that I am not able to connect as a "oidc_username=‘username’ " while running the command “vc = VirtualCoach(environment=‘local’, oidc_username=‘nrpuser’)” (got permission denied using password=‘password’). The error shown is the following:
File “”, line 1, in
File “/home/bbpnrsoa/nrp/src/VirtualCoach/hbp_nrp_virtual_coach/hbp_nrp_virtual_coach/virtual_coach.py”, line 106, in init
self.__oidc_client = BBPOIDCClient.implicit_auth(oidc_username)
File “/home/bbpnrsoa/.opt/platform_venv/lib/python2.7/site-packages/bbp_client/oidc/client.py”, line 96, in implicit_auth
c.credentials = c.manual_implicit_auth(user, password, use_cache)
File “/home/bbpnrsoa/.opt/platform_venv/lib/python2.7/site-packages/bbp_client/oidc/client.py”, line 278, in manual_implicit_auth
url_with_fragment = self._authenticate_user(authorize_url, user, passwd)
File “/home/bbpnrsoa/.opt/platform_venv/lib/python2.7/site-packages/bbp_client/oidc/client.py”, line 323, in _authenticate_user
raise BBPOIDCException(‘Permission denied’)
bbp_client.oidc.client.BBPOIDCException: Permission denied
On the other hand, using the "storage_username=‘nrpuser’ " in the same command (vc = VirtualCoach(environment=‘local’), storage_username=‘nrpuser’), with the password ‘password’, the problem is different:
Traceback (most recent call last):
File “”, line 1, in
File “/home/bbpnrsoa/nrp/src/VirtualCoach/hbp_nrp_virtual_coach/hbp_nrp_virtual_coach/virtual_coach.py”, line 116, in init
storage_username, storage_password)}
File “/home/bbpnrsoa/nrp/src/VirtualCoach/hbp_nrp_virtual_coach/hbp_nrp_virtual_coach/virtual_coach.py”, line 373, in __get_storage_token
json={‘user’: user_name, ‘password’: password})
File “/home/bbpnrsoa/.opt/platform_venv/lib/python2.7/site-packages/requests/api.py”, line 112, in post
return request(‘post’, url, data=data, json=json, **kwargs)
File “/home/bbpnrsoa/.opt/platform_venv/lib/python2.7/site-packages/requests/api.py”, line 58, in request
return session.request(method=method, url=url, **kwargs)
File “/home/bbpnrsoa/.opt/platform_venv/lib/python2.7/site-packages/requests/sessions.py”, line 512, in request
resp = self.send(prep, **send_kwargs)
File “/home/bbpnrsoa/.opt/platform_venv/lib/python2.7/site-packages/requests/sessions.py”, line 622, in send
r = adapter.send(request, **kwargs)
File “/home/bbpnrsoa/.opt/platform_venv/lib/python2.7/site-packages/requests/adapters.py”, line 513, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘localhost’, port=9000): Max retries exceeded with url: /proxy/authentication/authenticate (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f6e84085950>: Failed to establish a new connection: [Errno 111] Connection refused’,))
Maybe the problem is related to the fact the folder /home/bbpnrsoa/nrp/src/nrpBackendProxy seems to be missing (running the script ‘configure_nrp’ it’s stated that the folder is missing). I’m now working on this problem.
Cheers,
Luca