{"action":"created","issue":{"url":"https://api.github.com/repos/aiidateam/aiida_core/issues/1382","repository_url":"https://api.github.com/repos/aiidateam/aiida_core","labels_url":"https://api.github.com/repos/aiidateam/aiida_core/issues/1382/labels{/name}","comments_url":"https://api.github.com/repos/aiidateam/aiida_core/issues/1382/comments","events_url":"https://api.github.com/repos/aiidateam/aiida_core/issues/1382/events","html_url":"https://github.com/aiidateam/aiida_core/issues/1382","id":311898610,"number":1382,"title":"quicksetup fails without sudo","user":{"login":"giovannipizzi","id":16132028,"avatar_url":"https://avatars0.githubusercontent.com/u/16132028?v=4","gravatar_id":"","url":"https://api.github.com/users/giovannipizzi","html_url":"https://github.com/giovannipizzi","followers_url":"https://api.github.com/users/giovannipizzi/followers","following_url":"https://api.github.com/users/giovannipizzi/following{/other_user}","gists_url":"https://api.github.com/users/giovannipizzi/gists{/gist_id}","starred_url":"https://api.github.com/users/giovannipizzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giovannipizzi/subscriptions","organizations_url":"https://api.github.com/users/giovannipizzi/orgs","repos_url":"https://api.github.com/users/giovannipizzi/repos","events_url":"https://api.github.com/users/giovannipizzi/events{/privacy}","received_events_url":"https://api.github.com/users/giovannipizzi/received_events","type":"User","site_admin":false},"labels":[{"id":522097474,"url":"https://api.github.com/repos/aiidateam/aiida_core/labels/priority/important","name":"priority/important","color":"d95f0b","default":false},{"id":522091859,"url":"https://api.github.com/repos/aiidateam/aiida_core/labels/topic/VerdiCommandLine","name":"topic/VerdiCommandLine","color":"eeeeee","default":false},{"id":506125013,"url":"https://api.github.com/repos/aiidateam/aiida_core/labels/type/bug","name":"type/bug","color":"ee0701","default":false}],"state":"open","locked":false,"assignee":{"login":"DropD","id":1255940,"avatar_url":"https://avatars0.githubusercontent.com/u/1255940?v=4","gravatar_id":"","url":"https://api.github.com/users/DropD","html_url":"https://github.com/DropD","followers_url":"https://api.github.com/users/DropD/followers","following_url":"https://api.github.com/users/DropD/following{/other_user}","gists_url":"https://api.github.com/users/DropD/gists{/gist_id}","starred_url":"https://api.github.com/users/DropD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DropD/subscriptions","organizations_url":"https://api.github.com/users/DropD/orgs","repos_url":"https://api.github.com/users/DropD/repos","events_url":"https://api.github.com/users/DropD/events{/privacy}","received_events_url":"https://api.github.com/users/DropD/received_events","type":"User","site_admin":false},"assignees":[{"login":"DropD","id":1255940,"avatar_url":"https://avatars0.githubusercontent.com/u/1255940?v=4","gravatar_id":"","url":"https://api.github.com/users/DropD","html_url":"https://github.com/DropD","followers_url":"https://api.github.com/users/DropD/followers","following_url":"https://api.github.com/users/DropD/following{/other_user}","gists_url":"https://api.github.com/users/DropD/gists{/gist_id}","starred_url":"https://api.github.com/users/DropD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DropD/subscriptions","organizations_url":"https://api.github.com/users/DropD/orgs","repos_url":"https://api.github.com/users/DropD/repos","events_url":"https://api.github.com/users/DropD/events{/privacy}","received_events_url":"https://api.github.com/users/DropD/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-04-06T08:59:01Z","updated_at":"2018-04-06T09:07:14Z","closed_at":null,"author_association":"OWNER","body":"On dev-jupyter.materialscloud.org, when running the import-export demo from the aiida_demos repository (AiiDA tutorials app), I get this error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/verdi\", line 11, in <module>\r\n    sys.exit(run())\r\n  File \"/usr/local/lib/python2.7/dist-packages/aiida/cmdline/verdilib.py\", line 1049, in run\r\n    aiida.cmdline.verdilib.exec_from_cmdline(sys.argv)\r\n  File \"/usr/local/lib/python2.7/dist-packages/aiida/cmdline/verdilib.py\", line 1034, in exec_from_cmdline\r\n    CommandClass.run(*argv[command_position + 1:])\r\n  File \"/usr/local/lib/python2.7/dist-packages/aiida/cmdline/verdilib.py\", line 621, in run\r\n    quicksetup.invoke(ctx)\r\n  File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 895, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 535, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/click/decorators.py\", line 27, in new_func\r\n    return f(get_current_context().obj, *args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/aiida/cmdline/verdilib.py\", line 654, in quicksetup\r\n    success = postgres.determine_setup()\r\n  File \"/usr/local/lib/python2.7/dist-packages/aiida/control/postgres.py\", line 113, in determine_setup\r\n    non_interactive=bool(not self.interactive), **dbinfo):\r\n  File \"/usr/local/lib/python2.7/dist-packages/aiida/control/postgres.py\", line 281, in _try_subcmd\r\n    _pg_execute_sh(r'\\q', **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/aiida/control/postgres.py\", line 345, in _pg_execute_sh\r\n    result = subprocess.check_output(sudo_su_psql, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/subprocess32.py\", line 629, in check_output\r\n    process = Popen(stdout=PIPE, *popenargs, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/subprocess32.py\", line 825, in __init__\r\n    restore_signals, start_new_session)\r\n  File \"/usr/local/lib/python2.7/dist-packages/subprocess32.py\", line 1574, in _execute_child\r\n    raise child_exception_type(errno_num, err_msg)\r\nOSError: [Errno 2] No such file or directory: 'sudo'\r\n```\r\nI think that there should be some fallback and not a \"crash\". \r\nThis is also needed for the demos. @DropD do you think it's something easy/quick to fix?"},"comment":{"url":"https://api.github.com/repos/aiidateam/aiida_core/issues/comments/379194433","html_url":"https://github.com/aiidateam/aiida_core/issues/1382#issuecomment-379194433","issue_url":"https://api.github.com/repos/aiidateam/aiida_core/issues/1382","id":379194433,"user":{"login":"giovannipizzi","id":16132028,"avatar_url":"https://avatars0.githubusercontent.com/u/16132028?v=4","gravatar_id":"","url":"https://api.github.com/users/giovannipizzi","html_url":"https://github.com/giovannipizzi","followers_url":"https://api.github.com/users/giovannipizzi/followers","following_url":"https://api.github.com/users/giovannipizzi/following{/other_user}","gists_url":"https://api.github.com/users/giovannipizzi/gists{/gist_id}","starred_url":"https://api.github.com/users/giovannipizzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giovannipizzi/subscriptions","organizations_url":"https://api.github.com/users/giovannipizzi/orgs","repos_url":"https://api.github.com/users/giovannipizzi/repos","events_url":"https://api.github.com/users/giovannipizzi/events{/privacy}","received_events_url":"https://api.github.com/users/giovannipizzi/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T09:07:14Z","updated_at":"2018-04-06T09:07:14Z","author_association":"OWNER","body":"Also, @yakutovicha : what would be the correct approach to create a new DB inside the jupyter software stack? I guess there one does not need sudo as the DB is run as the user? "}}
{"actor":{"display_login":"giovannipizzi"}}