{"action":"created","issue":{"url":"https://api.github.com/repos/csdms/bmi_wrap/issues/6","repository_url":"https://api.github.com/repos/csdms/bmi_wrap","labels_url":"https://api.github.com/repos/csdms/bmi_wrap/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/csdms/bmi_wrap/issues/6/comments","events_url":"https://api.github.com/repos/csdms/bmi_wrap/issues/6/events","html_url":"https://github.com/csdms/bmi_wrap/issues/6","id":378061806,"node_id":"MDU6SXNzdWUzNzgwNjE4MDY=","number":6,"title":"post_gen_project.py hook fails on Linux","user":{"login":"mdpiper","id":5673711,"node_id":"MDQ6VXNlcjU2NzM3MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/5673711?v=4","gravatar_id":"","url":"https://api.github.com/users/mdpiper","html_url":"https://github.com/mdpiper","followers_url":"https://api.github.com/users/mdpiper/followers","following_url":"https://api.github.com/users/mdpiper/following{/other_user}","gists_url":"https://api.github.com/users/mdpiper/gists{/gist_id}","starred_url":"https://api.github.com/users/mdpiper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdpiper/subscriptions","organizations_url":"https://api.github.com/users/mdpiper/orgs","repos_url":"https://api.github.com/users/mdpiper/repos","events_url":"https://api.github.com/users/mdpiper/events{/privacy}","received_events_url":"https://api.github.com/users/mdpiper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-06T22:30:48Z","updated_at":"2018-11-06T22:31:17Z","closed_at":null,"author_association":"MEMBER","body":"The **post_gen_project.py** hook fails on line 99\r\n\r\n    clean_folder(LIB_DIRECTORY, keep=keep)\r\n\r\non Linux. This issue doesn't occur on macOS.\r\n\r\nTo reproduce, use the **plugin.yaml** file from [pymt_hydrotrend](https://github.com/pymt-lab/pymt_hydrotrend) and call `bmi-render`:\r\n\r\n    bmi-render plugin.yaml .\r\n\r\nThe full stack trace:\r\n\r\n```\r\nreading template from http://github.com/mcflugen/cookiecutter-bmi-wrap\r\nTraceback (most recent call last):\r\n  File \"/tmp/tmp4gc5ae5h.py\", line 90, in <module>\r\n    clean_folder(LIB_DIRECTORY, keep=keep)\r\n  File \"/tmp/tmp4gc5ae5h.py\", line 38, in clean_folder\r\n    folderpath.rmdir()\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/pathlib.py\", line 1290, in rmdir\r\n    self._accessor.rmdir(self)\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/pathlib.py\", line 387, in wrapped\r\n    return strfunc(str(pathobj), *args)\r\nOSError: [Errno 39] Directory not empty: '/home/mpiper/tmp/pymt_hydrotrend/pymt_hydrotrend/lib'\r\nStopping generation because post_gen_project hook script didn't exit successfully\r\nTraceback (most recent call last):\r\n  File \"/home/csdms/anaconda3/envs/wrap/bin/bmi-render\", line 11, in <module>\r\n    load_entry_point('bmi-wrap', 'console_scripts', 'bmi-render')()\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/site-packages/click/core.py\", line 764, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/site-packages/click/core.py\", line 717, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/site-packages/click/core.py\", line 956, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/site-packages/click/core.py\", line 555, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/home/mpiper/projects/bmi_wrap/bmi_wrap/cli/main_render.py\", line 250, in main\r\n    clobber=clobber,\r\n  File \"/home/mpiper/projects/bmi_wrap/bmi_wrap/cli/main_render.py\", line 316, in render_plugin_repo\r\n    overwrite_if_exists=clobber,\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/site-packages/cookiecutter/main.py\", line 94, in cookiecutter\r\n    output_dir=output_dir\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/site-packages/cookiecutter/generate.py\", line 376, in generate_files\r\n    delete_project_on_failure\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/site-packages/cookiecutter/generate.py\", line 236, in _run_hook_from_repo_dir\r\n    run_hook(hook_name, project_dir, context)\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/site-packages/cookiecutter/hooks.py\", line 144, in run_hook\r\n    run_script_with_context(script, project_dir, context)\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/site-packages/cookiecutter/hooks.py\", line 128, in run_script_with_context\r\n    run_script(temp.name, cwd)\r\n  File \"/home/csdms/anaconda3/envs/wrap/lib/python3.6/site-packages/cookiecutter/hooks.py\", line 91, in run_script\r\n    'Hook script failed (exit status: {})'.format(exit_status)\r\ncookiecutter.exceptions.FailedHookException: Hook script failed (exit status: 1)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/csdms/bmi_wrap/issues/comments/436433292","html_url":"https://github.com/csdms/bmi_wrap/issues/6#issuecomment-436433292","issue_url":"https://api.github.com/repos/csdms/bmi_wrap/issues/6","id":436433292,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjQzMzI5Mg==","user":{"login":"mdpiper","id":5673711,"node_id":"MDQ6VXNlcjU2NzM3MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/5673711?v=4","gravatar_id":"","url":"https://api.github.com/users/mdpiper","html_url":"https://github.com/mdpiper","followers_url":"https://api.github.com/users/mdpiper/followers","following_url":"https://api.github.com/users/mdpiper/following{/other_user}","gists_url":"https://api.github.com/users/mdpiper/gists{/gist_id}","starred_url":"https://api.github.com/users/mdpiper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdpiper/subscriptions","organizations_url":"https://api.github.com/users/mdpiper/orgs","repos_url":"https://api.github.com/users/mdpiper/repos","events_url":"https://api.github.com/users/mdpiper/events{/privacy}","received_events_url":"https://api.github.com/users/mdpiper/received_events","type":"User","site_admin":false},"created_at":"2018-11-06T22:31:17Z","updated_at":"2018-11-06T22:31:17Z","author_association":"MEMBER","body":"If I comment out the problematic line in the hook, everything works fine."}}
{"actor":{"display_login":"mdpiper"}}