{"action":"created","issue":{"url":"https://api.github.com/repos/juju/charm-tools/issues/69","labels_url":"https://api.github.com/repos/juju/charm-tools/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/juju/charm-tools/issues/69/comments","events_url":"https://api.github.com/repos/juju/charm-tools/issues/69/events","html_url":"https://github.com/juju/charm-tools/issues/69","id":120681943,"number":69,"title":"Generated relation and storage hooks are broken in 1.10","user":{"login":"axw","id":843579,"avatar_url":"https://avatars.githubusercontent.com/u/843579?v=3","gravatar_id":"","url":"https://api.github.com/users/axw","html_url":"https://github.com/axw","followers_url":"https://api.github.com/users/axw/followers","following_url":"https://api.github.com/users/axw/following{/other_user}","gists_url":"https://api.github.com/users/axw/gists{/gist_id}","starred_url":"https://api.github.com/users/axw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axw/subscriptions","organizations_url":"https://api.github.com/users/axw/orgs","repos_url":"https://api.github.com/users/axw/repos","events_url":"https://api.github.com/users/axw/events{/privacy}","received_events_url":"https://api.github.com/users/axw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-07T01:41:38Z","updated_at":"2015-12-07T09:21:39Z","closed_at":null,"body":"I've just built a reactive charm with 1.10, and had errors in storage-attached due to the generated hook file having a blank line before the shebang. Probably broken with the change over to using Python 3."},"comment":{"url":"https://api.github.com/repos/juju/charm-tools/issues/comments/162457775","html_url":"https://github.com/juju/charm-tools/issues/69#issuecomment-162457775","issue_url":"https://api.github.com/repos/juju/charm-tools/issues/69","id":162457775,"user":{"login":"gnuoy","id":6472064,"avatar_url":"https://avatars.githubusercontent.com/u/6472064?v=3","gravatar_id":"","url":"https://api.github.com/users/gnuoy","html_url":"https://github.com/gnuoy","followers_url":"https://api.github.com/users/gnuoy/followers","following_url":"https://api.github.com/users/gnuoy/following{/other_user}","gists_url":"https://api.github.com/users/gnuoy/gists{/gist_id}","starred_url":"https://api.github.com/users/gnuoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnuoy/subscriptions","organizations_url":"https://api.github.com/users/gnuoy/orgs","repos_url":"https://api.github.com/users/gnuoy/repos","events_url":"https://api.github.com/users/gnuoy/events{/privacy}","received_events_url":"https://api.github.com/users/gnuoy/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T09:21:39Z","updated_at":"2015-12-07T09:21:39Z","body":"Me too. Blank line at top of generated hook file and python3 seems to fail to import charms.reactive:\r\n\r\n# ./hooks/database-relation-changed\r\n./hooks/database-relation-changed: line 5: import: command not found\r\n./hooks/database-relation-changed: line 6: syntax error near unexpected token `'lib''\r\n./hooks/database-relation-changed: line 6: `sys.path.append('lib')'\r\n# sed -i -e \"1d\" ./hooks/database-relation-changed\r\n# ./hooks/database-relation-changed\r\nTraceback (most recent call last):\r\n  File \"./hooks/database-relation-changed\", line 13, in <module>\r\n    from charms.reactive import main\r\nImportError: No module named 'charms'\r\n# sed -i -e 's/python3/python/' ./hooks/database-relation-changed\r\n# ./hooks/database-relation-changed\r\n# "}}