Problem using Virtual Coach


#1

Hi,
I’m having problems with the Virtual Coach. In particular, after running ‘from hbp_nrp_virtual_coach.virtual_coach import VirtualCoach’ from a terminal, the result is:

from hbp_nrp_virtual_coach.virtual_coach import VirtualCoach
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 29, in
from hbp_nrp_virtual_coach.simulation import Simulation
File “/home/bbpnrsoa/nrp/src/VirtualCoach/hbp_nrp_virtual_coach/hbp_nrp_virtual_coach/simulation.py”, line 30, in
from bbp_client.oidc.client import BBPOIDCClient
ImportError: No module named bbp_client.oidc.client

I’ve tried to use ‘pip install bbp_client.oidc.client’ as Daniele did in a previous topics
to fix his problem, but it didn’t solve mine. The message shown is the
following:

luca@luca-SATELLITE-C55-A-15C:~$ pip install bbp_client.oidc.client
Collecting bbp_client.oidc.client
Could not find a version that satisfies the requirement bbp_client.oidc.client (from versions: )
No matching distribution found for bbp_client.oidc.client

How could I solve it? Thanks, Luca


#2

Dear Luca,

The bbpclient python package is coped by user-scripts/configure_nrp into your $VIRTUAL_ENV (~/.opt/platform_venv).
Might be that something went wrong here? Check if there is a bbpclient folder in $VIRTUAL_ENV/lib/python2.7/site-packages. If not, try running the configure_nrp script manually. If this still fails, copy user-scripts/cnofig_files/platform_venv/* to $VIRTUAL_ENV/lib/python2.7/site-packages.

Other option, might be that cle-virtual-coach is not adding properly the $VIRTUAL_ENV/lib/python2.7/site-packages to your PYTHONPATH.

If you are using a docker setup, you can do all this by connecting to the backend with the appropriate command from the script.

Cheers,
Axel


#3

Dear Axel,

Running the configure_nrp script manually fixed the probelm. Sadly, now I’m facing with another one. Following the manual, I’ve launched the commands:

from hbp_nrp_virtual_coach.virtual_coach import VirtualCoach
vc = VirtualCoach(environment=‘local’)

and here the result:

INFO: [2018-09-03 10:03:57,544 - Configuration] Loading configuration file config.json
INFO: [2018-09-03 10:03:57,544 - Configuration] Loading configuration file config.json
INFO: [2018-09-03 10:03:57,544 - Configuration] Loading configuration file config.json
INFO: [2018-09-03 10:03:57,544 - Configuration] Loading configuration file config.json
INFO: [2018-09-03 10:03:57,546 - Configuration] Using user specified environment: local
INFO: [2018-09-03 10:03:57,546 - Configuration] Using user specified environment: local
INFO: [2018-09-03 10:03:57,546 - Configuration] Using user specified environment: local
INFO: [2018-09-03 10:03:57,546 - Configuration] Using user specified environment: local
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 119, in init
raise Exception(‘Virtual Coach instantiated without storage server credentials or oidc’
Exception: Virtual Coach instantiated without storage server credentials or oidccredentials. You have to provide either one with the keywords “storage_username” or “oidc_username” to have access to Experiment files.

Could you please still help me? Thanks.

Cheers,
Luca


#4

As the error message suggests, you have to pass the storage_username parameter to the VirtualCoach instantiation.

vc = VirtualCoach(environment='local', storage_username='nrpuser')

After that you will be prompted to enter the password, which in this case is ‘password’.

Unfortunately the API documentation is not up to date but we’re working on it.

Best,
Mahmoud


#5

Dear Mahmoud,

thank’s for the answer, now it’s working. Unfortunatelly, one more problem occours with the module ‘mechanize’. Here’s the terminal’s output:

vc = VirtualCoach(environment=‘local’, oidc_username=“nrpuser”)
INFO: [2018-09-03 12:58:40,157 - Configuration] Loading configuration file config.json
INFO: [2018-09-03 12:58:40,157 - Configuration] Loading configuration file config.json
INFO: [2018-09-03 12:58:40,159 - Configuration] Using user specified environment: local
INFO: [2018-09-03 12:58:40,159 - Configuration] Using user specified environment: local
INFO: [2018-09-03 12:58:40,159 - VirtualCoach] Logging into OIDC as: nrpuser
INFO: [2018-09-03 12:58:40,159 - VirtualCoach] Logging into OIDC as: nrpuser
Password:
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 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 305, in _authenticate_user
import mechanize
ImportError: No module named mechanize

I’ve tried with ‘pip install mechanize’ but still have problem. The error shown is:

luca@luca-SATELLITE-C55-A-15C:~$ pip install mechanize
Collecting mechanize
Using cached https://files.pythonhosted.org/packages/a7/ac/7f54bcf39b62cd56dec461f4c5e2d7c096508ab2b283c7ee099a466e1b9f/mechanize-0.3.6.tar.gz
Complete output from command python setup.py egg_info:
mechanize only works on python 2.x


Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-p31o3zqe/mechanize/

Don’t know exactly what it means. Hope this will be the last problem :frowning:

Thanks,
Luca

P.S. Using the ‘storage_username’, system warn me:

WARNING: [2018-09-03 13:08:03,423 - VirtualCoach] No OIDC username supplied, simulation services will fail if OIDC is enabled in this environment (local).

and infact ends with an error:

ConnectionError: HTTPConnectionPool(host=‘localhost’, port=9000): Max retries exceeded with url: /proxy/authentication/authenticate (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f9454130310>: Failed to establish a new connection: [Errno 111] Connection refused’,))


#6

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


#7

The folders missing in /home/bbpnrsoa/nrp/src/ are nrpBackendProxy and ExDFrontend. I successfully copied them. Now the ‘configure_nrp’ command doesn’t show any errors. However, nginx isn’t able to restart (nor even to start anyway). The message shown at the end, after running ‘configure_nrp’, is:

Using the proxy config file containing your localhost as backend, and your FS as storage

  • Restarting nginx nginx [fail]
    Done
    DONE

Warning: your running mode has been switched to full local (2).
you might want to run running_mode to change it.

I’ve tried to detect the problem starting the nginx apart, but without success:

bbpnrsoa@346d7f63aaf0:~/nrp/src$ sudo $HOME/.local/etc/init.d/nginx stop

  • Stopping nginx nginx [ OK ]
    bbpnrsoa@346d7f63aaf0:~/nrp/src$ sudo $HOME/.local/etc/init.d/nginx start
  • Starting nginx nginx [fail]
    bbpnrsoa@346d7f63aaf0:~/nrp/src$ sudo $HOME/.local/etc/init.d/nginx restart
  • Restarting nginx nginx [fail]
    bbpnrsoa@346d7f63aaf0:~/nrp/src$ sudo $HOME/.local/etc/init.d/nginx status
  • nginx is not running

That shows nginx is not working properly. Thanks for help


#8

Fixed the problem with nginx. However, I’m still having problem with authentication. storage_username=‘nrpuser’ and oidc_username=‘nrpuser’ are still not valid entering the password=’‘password’. Result of running command with storage_username:

from hbp_nrp_virtual_coach.virtual_coach import VirtualCoach
vc = VirtualCoach(environment=‘local’, storage_username=‘nrpuser’)

INFO: [2018-09-10 13:03:12,499 - rospy.topics] topicmanager initialized
INFO: [2018-09-10 13:03:12,638 - Configuration] Loading configuration file config.json
INFO: [2018-09-10 13:03:12,638 - Configuration] Using user specified environment: local
WARNING: [2018-09-10 13:03:12,639 - VirtualCoach] No OIDC username supplied, simulation services will fail if OIDC is enabled in this environment (local).
INFO: [2018-09-10 13:03:12,639 - VirtualCoach] Logging into the Storage Server as: nrpuser
Password:
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 376, in __get_storage_token
% response.status_code)
Exception: Storage Server authentication failed, Status Code: 502

Result of running command oidc_username:

vc = VirtualCoach(environment=‘local’, oidc_username=‘nrpuser’)

INFO: [2018-09-10 13:03:52,348 - Configuration] Loading configuration file config.json
INFO: [2018-09-10 13:03:52,348 - Configuration] Loading configuration file config.json
INFO: [2018-09-10 13:03:52,348 - Configuration] Loading configuration file config.json
INFO: [2018-09-10 13:03:52,349 - Configuration] Using user specified environment: local
INFO: [2018-09-10 13:03:52,349 - Configuration] Using user specified environment: local
INFO: [2018-09-10 13:03:52,349 - Configuration] Using user specified environment: local
INFO: [2018-09-10 13:03:52,350 - VirtualCoach] Logging into OIDC as: nrpuser
INFO: [2018-09-10 13:03:52,350 - VirtualCoach] Logging into OIDC as: nrpuser
INFO: [2018-09-10 13:03:52,350 - VirtualCoach] Logging into OIDC as: nrpuser
Password:
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 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

Please, help.

Best,
Luca


#9

If you’re running this on your local machine then you should only use the storage_username. The oidc_username should only be used if you want to access our servers and requires a special account.
This error means that no user with those credentials was created. This is usually done during installation when running the configure_nrp script. There’s a question that pops up in yellow asking " Would you like to setup your local storage database with a default user? (Y/n)" to which you should answer “y”.
To be sure if the user has been created or not you can check out the file $HOME/.opt/nrpStorage/FS_db/users and see if there’s an entry with “nrpuser” and “password” as username and password.


#10

Dear Luca, you sound like you have an incorrect running “mode”, because it requires OIDC authentication.
Can you rerun configure_nrp and accept all default questions, as Mahmoud advised? This shouls reset you in full local mode and disable OIDC auth.

Best,
Axel


#11

Dear Mahmoud,

here is the content of $HOME/.opt/nrpStorage/FS_db/users:

{“k”:“0000000078”,“o”:“0000000116”,“v”:“001”}
{"_id":2,"_uid":2,"_dt":1534172115282,"_s":“6d45fa19958edc421f164eec82002a32”}
{“user”:“nrpuser”,“password”:“password”,“token”:“1be57b73-3ad3-4e67-811a-e48483$
{“k”:“0000000078”,“o”:“0000000114”,“v”:“001”}
{”_id":3,"_uid":3,"_dt":1534172115411,"_s":“804b9a10cf5713888141d3687b51d3f2”}
{“user”:“admin”,“password”:“password”,“token”:"f4e0e917-66e1-4a06-9c6f-3cf272a6$

It seems the user has been created. I answered “y” to the question: " Would you like to setup your local storage database with a default user? (Y/n)" when running configure_nrp script. The answer is:

Setting up local storage database
STORAGE_PATH is set to ‘/home/bbpnrsoa/.opt/nrpStorage’

Maybe the problem is related to the others yellow pops up question?
Thanks,

Luca


#12

Dear Axel,

I rerun configure_nrp and accepted all default questions, but the problem still persists. I suppose I’m running in full local (2) since it’s clearly said “Warning: your running mode has been switched to full local (2). you might want to run running_mode to change it.” after run the configure_nrp script.

Best,
Luca


#13

Did you ever use the frontend? If yes, could you log in in the frontend with the same credentials?


#14

frontend is not working better. After running from ‘hbp_nrp_virtual_coach.virtual_coach import VirtualCoach’ it returns with the error
‘Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named hbp_nrp_virtual_coach.virtual_coach’.

Running the configure_nrp script it has the following problem:

Removing existing config files for nginx, ExDFrontend, ExDBackend, CLE, nrpBackendProxy and the gzserver/gzbridge scripts.
Would you like to NOT backup your local versions? (this also purges your existing backups) (y/N)

  • Stopping nginx nginx [ OK ]
    Backed up /home/bbpnrsoa/nrp/src/ExDFrontend/app/config.json.bak2
    Backed up /home/bbpnrsoa/nrp/src/nrpBackendProxy/config.json.bak2
    DONE
    mkdir: created directory ‘/home/bbpnrsoa/.local/etc/nginx’
    mkdir: created directory ‘/home/bbpnrsoa/.local/etc/init.d’
    mkdir: created directory ‘/home/bbpnrsoa/.local/etc/default’
    mkdir: created directory ‘/home/bbpnrsoa/nginx’
    mkdir: created directory ‘/home/bbpnrsoa/.local/var/log/nginx’
    mkdir: created directory ‘/home/bbpnrsoa/.local/etc/nginx/lua’
    mkdir: created directory ‘/home/bbpnrsoa/.local/etc/nginx/conf.d’
    mkdir: created directory ‘/home/bbpnrsoa/.opt/bbp’
    Copying user_makefile to python repos
    Copying Frontend config.json file
    Copying start/stop scripts for gzserver and gzbridge
    Copying CLE config.ini file
    ln: failed to create symbolic link ‘/home/bbpnrsoa/nrp/src/CLE/hbp_nrp_cle/hbp_nrp_cle/config.ini.sample’: Not a directory
    cp: failed to access ‘/home/bbpnrsoa/nrp/src/CLE/hbp_nrp_cle/hbp_nrp_cle/config.ini’: Not a directory
    Copying hbp-flask-restful config files.
    ln: failed to create symbolic link ‘/home/bbpnrsoa/nrp/src/ExDBackend/hbp-flask-restful-swagger-master/flask_restful_swagger/static/config.json.sample’: Not a directory
    cp: failed to access ‘/home/bbpnrsoa/nrp/src/ExDBackend/hbp-flask-restful-swagger-master/flask_restful_swagger/static/config.json’: Not a directory
    Copying Proxy config files.
    Copying Nginx config files
    Copying uwsgi config file
    Copying VirtualCoach config.json file
    cp: failed to access ‘/home/bbpnrsoa/nrp/src/VirtualCoach/hbp_nrp_virtual_coach/hbp_nrp_virtual_coach/config.json’: Not a directory
    Generating schema parsers for ExDBackend
    ExDBackend is not built yet. Skipping schema parsers generation.
    Would you like to setup your local storage database with a default user? (Y/n)
    Setting up local storage database
    STORAGE_PATH is set to ‘/home/bbpnrsoa/.opt/nrpStorage’
    Username with this password already exists
    ERROR
    Would you like to apply the XML TFs migration script to your local experiments? (Y/n)
    Applying xml TF migration steps
    /home/bbpnrsoa/nrp/src/user-scripts/migrate_xmltf/migrate_cloned.sh: line 3: /home/bbpnrsoa/.opt/platform_venv/bin/activate: No such file or directory
    Setting configuration files to default mode (offline mode)
    Editing Backend config.json
    /home/bbpnrsoa/nrp/src/user-scripts/running_mode: line 34: cd: /home/bbpnrsoa/nrp/src/ExDBackend/hbp-flask-restful-swagger-master/flask_restful_swagger/static: Not a directory
    sed: can’t read config.json: No such file or directory
    Editing nginx conf files
    Using the proxy config file containing your localhost as backend, and your FS as storage
  • Restarting nginx nginx [fail]
    Done
    DONE
    Warning: your running mode has been switched to full local (2).
    you might want to run running_mode to change it.

It seems that lots of directory are missing


#15

Yes, I wonder why. I’d suggest you remove everything and start a clean install. It seems like your current install is very messy and some parts of the installation process were not completed.

So remove Everything and follow the install instructions step by step. And if you have any errors while installing please report them here.


#16

Ok, I’ll try. Do you think I should reinstall also docker?


#17

Wait. So if you run the configure_nrp script, run it in the frontend AND in the backend containers, to reset everything clean.
Other important point, virtual coach is installed only in the backend container.
And if the configure_nrp complains about missing dirs, it’s ok, it’s because frontend lacks the backend dirs and backend lacks the frontend dirs.

If you want to reinstall fresh, you can use the nrp_installer.sh script to uninstall and install. Though I think an update would do the trick, since it would delete and re-create the containers from scratch if you answer yes to the questions.


#18

I’ve used the uninstall and install script. It follows series of warnings:

WARNING:pyxb.binding.generate:Attribute {http://schemas.humanbrainproject.eu/SP10/2014/BIBI}Range.from renamed to from_
Python for http://schemas.humanbrainproject.eu/SP10/2014/BIBI requires 1 modules
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}Exmode.datatype renamed to Exmode_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}Binding.datatype renamed to Binding_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}HistoryType.datatype renamed to HistoryType_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}TransitionType.datatype renamed to TransitionType_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}Boolean.datatype renamed to Boolean_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}AssignType.datatype renamed to AssignType_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}URI.datatype renamed to URI_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}Integer.datatype renamed to Integer_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}Duration.datatype renamed to Duration_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}EventType.datatype renamed to EventType_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}EventTypes.datatype renamed to EventTypes_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}CondLang.datatype renamed to CondLang_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}LocLang.datatype renamed to LocLang_datatype
WARNING:pyxb.binding.generate:Simple type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}ValueLang.datatype renamed to ValueLang_datatype
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2014/ExDConfig}ExD renamed to ExD_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.state.type renamed to scxml_state_type
WARNING:pyxb.binding.generate:Attribute {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.state.type.initial renamed to initial_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.initial.type renamed to scxml_initial_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.onentry.type renamed to scxml_onentry_type
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.onentry.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}if renamed to if_
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.onentry.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}raise renamed to raise_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.onexit.type renamed to scxml_onexit_type
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.onexit.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}if renamed to if_
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.onexit.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}raise renamed to raise_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.parallel.type renamed to scxml_parallel_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.final.type renamed to scxml_final_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.donedata.type renamed to scxml_donedata_type
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.donedata.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}content renamed to content_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.else.type renamed to scxml_else_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.raise.type renamed to scxml_raise_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.datamodel.type renamed to scxml_datamodel_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.finalize.type renamed to scxml_finalize_type
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.finalize.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}if renamed to if_
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.finalize.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}raise renamed to raise_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.scxml.type renamed to scxml_scxml_type
WARNING:pyxb.binding.generate:Attribute {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.scxml.type.datamodel renamed to datamodel_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.transition.type renamed to scxml_transition_type
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.transition.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}if renamed to if_
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.transition.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}raise renamed to raise_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.history.type renamed to scxml_history_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.if.type renamed to scxml_if_type
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.if.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}if renamed to if_
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.if.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}else renamed to else_
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.if.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}raise renamed to raise_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.elseif.type renamed to scxml_elseif_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.foreach.type renamed to scxml_foreach_type
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.foreach.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}if renamed to if_
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.foreach.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}raise renamed to raise_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.log.type renamed to scxml_log_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.data.type renamed to scxml_data_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.param.type renamed to scxml_param_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.assign.type renamed to scxml_assign_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.script.type renamed to scxml_script_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.content.type renamed to scxml_content_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.send.type renamed to scxml_send_type
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.send.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}content renamed to content_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.cancel.type renamed to scxml_cancel_type
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.invoke.type renamed to scxml_invoke_type
WARNING:pyxb.binding.generate:Element use {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.invoke.type.{http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}content renamed to content_
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.eventmapper.restrict renamed to scxml_eventmapper_restrict
WARNING:pyxb.binding.generate:Complex type {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}scxml.eventmapper renamed to scxml_eventmapper
WARNING:pyxb.binding.generate:Element {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}else renamed to else_
WARNING:pyxb.binding.generate:Element {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}raise renamed to raise_
WARNING:pyxb.binding.generate:Element {http://schemas.humanbrainproject.eu/SP10/2015/ExDConfig/scxml}if renamed to if_
Python for http://schemas.humanbrainproject.eu/SP10/2014/ExDConfig requires 2 modules
Python for http://schemas.humanbrainproject.eu/SP10/2017/environment_model_config requires 1 modules
WARNING:pyxb.binding.generate:Attribute {http://schemas.humanbrainproject.eu/SP10/2017/robot_model_config}youtube_resource.youtube-id renamed to youtube_id
Python for http://schemas.humanbrainproject.eu/SP10/2017/robot_model_config requires 1 modules
Starting supervisor: supervisord.
Finished setting up nrp container.
nrp container is now up and running.
Checking ports
Port 9000 is available.
Starting frontend container on port 9000 using image hbpneurorobotics/nrp_frontend:dev
488d95bdbf1e06b7eb04bb1618179f20d1419ef4c651b2c5d8296d01d5a24fb9
Starting supervisor: supervisord.
Finished setting up frontend container.
frontend container is now up and running.


#19

The warnings are fine. The platform should be warning despite the warnings.


#20

Ok, the platform should be installed correctly. I then run the script ‘./nrp_installer start’ to start the frontend and backend containers. Then I run ./nrp_installer connect_backend. I opend a python virtual coach session and then run the script ‘from hbp_nrp_virtual_coach.virtual_coach import VirtualCoach’ and then ‘vc = VirtualCoach(environment=‘local’, storage_username=‘nrpuser’)’ but still have the same problem:

vc = VirtualCoach(environment=‘local’, storage_username=‘nrpuser’)

INFO: [2018-09-11 08:56:35,164 - rospy.topics] topicmanager initialized
INFO: [2018-09-11 08:56:35,326 - Configuration] Loading configuration file config.json
INFO: [2018-09-11 08:56:35,339 - Configuration] Using user specified environment: local
WARNING: [2018-09-11 08:56:35,340 - VirtualCoach] No OIDC username supplied, simulation services will fail if OIDC is enabled in this environment (local).
INFO: [2018-09-11 08:56:35,340 - VirtualCoach] Logging into the Storage Server as: nrpuser
Password:
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 376, in __get_storage_token
% response.status_code)
Exception: Storage Server authentication failed, Status Code: 502

Running the configure_nrp command failed.

bbpnrsoa@fc785149615e:~/nrp/src$ configure_nrp
Removing existing config files for nginx, ExDFrontend, ExDBackend, CLE, nrpBackendProxy and the gzserver/gzbridge scripts.
Would you like to NOT backup your local versions? (this also purges your existing backups) (y/N)
N

  • Stopping nginx nginx start-stop-daemon: warning: failed to kill 477: Operation not permitted
    [ OK ]
    Backed up /home/bbpnrsoa/nrp/src/CLE/hbp_nrp_cle/hbp_nrp_cle/config.ini.bak2
    Backed up /home/bbpnrsoa/nrp/src/ExDBackend/hbp-flask-restful-swagger-master/flask_restful_swagger/static/config.json.bak2
    Backed up /home/bbpnrsoa/nrp/src/VirtualCoach/hbp_nrp_virtual_coach/hbp_nrp_virtual_coach/config.json.bak2
    DONE
    mkdir: created directory ‘/home/bbpnrsoa/.local/etc/nginx’
    mkdir: created directory ‘/home/bbpnrsoa/.local/etc/init.d’
    mkdir: created directory ‘/home/bbpnrsoa/.local/etc/default’
    mkdir: created directory ‘/home/bbpnrsoa/nginx’
    mkdir: created directory ‘/home/bbpnrsoa/.local/var/log/nginx’
    mkdir: created directory ‘/home/bbpnrsoa/.local/etc/nginx/lua’
    mkdir: created directory ‘/home/bbpnrsoa/.local/etc/nginx/conf.d’
    mkdir: created directory ‘/home/bbpnrsoa/.opt/bbp’
    Copying user_makefile to python repos
    Copying Frontend config.json file
    ln: failed to create symbolic link ‘/home/bbpnrsoa/nrp/src/ExDFrontend/app/config.json.local’: No such file or directory
    cp: cannot stat ‘/home/bbpnrsoa/nrp/src/ExDFrontend/app/config.json.local’: No such file or directory
    sed: can’t read /home/bbpnrsoa/nrp/src/ExDFrontend/app/config.json: No such file or directory
    Copying start/stop scripts for gzserver and gzbridge
    Copying CLE config.ini file
    Copying hbp-flask-restful config files.
    Copying Proxy config files.
    ln: failed to create symbolic link ‘/home/bbpnrsoa/nrp/src/nrpBackendProxy/config.json.sample.local’: No such file or directory
    Copying Nginx config files
    Copying uwsgi config file
    Copying VirtualCoach config.json file
    Copying VirtualCoach bbpclient
    Generating schema parsers for ExDBackend
    Python for http://schemas.humanbrainproject.eu/SP10/2014/BIBI requires 1 modules
    Python for http://schemas.humanbrainproject.eu/SP10/2014/ExDConfig requires 2 modules
    Python for http://schemas.humanbrainproject.eu/SP10/2017/environment_model_config requires 1 modules
    Python for http://schemas.humanbrainproject.eu/SP10/2017/robot_model_config requires 1 modules
    mv: replace ‘/home/bbpnrsoa/nrp/src/ExDBackend/hbp_nrp_commons/hbp_nrp_commons/generated/bibi_api_gen.py’, overriding mode 0644 (rw-r–r--)?
    mv: replace ‘/home/bbpnrsoa/nrp/src/ExDBackend/hbp_nrp_commons/hbp_nrp_commons/generated/exp_conf_api_gen.py’, overriding mode 0644 (rw-r–r--)?
    mv: replace ‘/home/bbpnrsoa/nrp/src/ExDBackend/hbp_nrp_commons/hbp_nrp_commons/generated/_sc.py’, overriding mode 0644 (rw-r–r--)?
    mv: replace ‘/home/bbpnrsoa/nrp/src/ExDBackend/hbp_nrp_commons/hbp_nrp_commons/generated/robot_conf_api_gen.py’, overriding mode 0644 (rw-r–r--)?
    mv: replace ‘/home/bbpnrsoa/nrp/src/ExDBackend/hbp_nrp_commons/hbp_nrp_commons/generated/environment_conf_api_gen.py’, overriding mode 0644 (rw-r–r--)?
    Would you like to setup your local storage database with a default user? (Y/n)
    Y
    Setting up local storage database
    STORAGE_PATH is set to ‘/home/bbpnrsoa/.opt/nrpStorage’
    module.js:549
    throw err;
    ^
    Error: Cannot find module ‘/home/bbpnrsoa/nrp/src/nrpBackendProxy/utils/createFSUser.js’
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
    ERROR
    Would you like to apply the XML TFs migration script to your local experiments? (Y/n)
    Y
    Applying xml TF migration steps
    Setting configuration files to default mode (offline mode)
    Editing Backend config.json
    Editing nginx conf files
    Using the proxy config file containing your localhost as backend, and your FS as storage
    /home/bbpnrsoa/nrp/src/user-scripts/running_mode: line 70: cd: /home/bbpnrsoa/nrp/src/nrpBackendProxy: No such file or directory
    cp: cannot stat ‘config.json.sample.local’: No such file or directory
    sed: can’t read config.json: No such file or directory
    sed: can’t read config.json: No such file or directory
    /home/bbpnrsoa/nrp/src/user-scripts/running_mode: line 86: cd: /home/bbpnrsoa/nrp/src/nrpBackendProxy: No such file or directory
    sed: can’t read config.json: No such file or directory
  • Restarting nginx nginx [fail]
    Done
    DONE
    Warning: your running mode has been switched to full local (2).
    you might want to run running_mode to change it.

These are exactly the same errors of the previuos install.