{"action":"opened","issue":{"url":"https://api.github.com/repos/Miserlou/Zappa/issues/159","repository_url":"https://api.github.com/repos/Miserlou/Zappa","labels_url":"https://api.github.com/repos/Miserlou/Zappa/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/Miserlou/Zappa/issues/159/comments","events_url":"https://api.github.com/repos/Miserlou/Zappa/issues/159/events","html_url":"https://github.com/Miserlou/Zappa/issues/159","id":162967317,"number":159,"title":"\"module initialization error\" message for barebones flask app","user":{"login":"mgalvey","id":476468,"avatar_url":"https://avatars.githubusercontent.com/u/476468?v=3","gravatar_id":"","url":"https://api.github.com/users/mgalvey","html_url":"https://github.com/mgalvey","followers_url":"https://api.github.com/users/mgalvey/followers","following_url":"https://api.github.com/users/mgalvey/following{/other_user}","gists_url":"https://api.github.com/users/mgalvey/gists{/gist_id}","starred_url":"https://api.github.com/users/mgalvey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgalvey/subscriptions","organizations_url":"https://api.github.com/users/mgalvey/orgs","repos_url":"https://api.github.com/users/mgalvey/repos","events_url":"https://api.github.com/users/mgalvey/events{/privacy}","received_events_url":"https://api.github.com/users/mgalvey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-29T16:15:42Z","updated_at":"2016-06-29T16:15:42Z","closed_at":null,"body":"This might be a duplicate of #107. I've been trying to get a minimal deployment (barebones generic Flask app) to work, using the example embedded into the readme, but I'm ending up with a blank response and an error message in CloudWatch when I try to hit my live API Gateway URL: \"module initialization error: Attempted relative import in non-package\"\r\n\r\nI've tried to mimic the animated gif example as closely as I could, just to make sure I wasn't hitting some edge case of incompatibility with my \"real\" code.\r\n\r\nI've been using a minimal install of CentOS in a VM for these tests, and I've copied the steps I took below. Am I missing something obvious here, or is there some bug in Zappa causing this to occur?\r\n\r\n```\r\nroot@localhost ~/test# zappa --version\r\n0.18.1\r\nroot@localhost ~/test# for file in (ls)\r\n                           echo $file: & cat $file\r\n                       end\r\napp.py:\r\nfrom flask import Flask\r\n\r\napp = Flask(__name__)\r\n\r\n@app.route(\"/\")\r\ndef hello():\r\n    return \"Hello World!\"\r\n\r\nif __name__ == \"__main__\":\r\n    app.run()\r\nzappa_settings.json:\r\n{\r\n    \"test1\": {\r\n       \"s3_bucket\": \"4242-zappa\",\r\n       \"app_function\": \"app.py\",\r\n       \"delete_zip\": false,\r\n       \"parameter_depth\": 1,\r\n    }\r\n}\r\nroot@localhost ~/test# virtualenv venv\r\nNew python executable in /root/test/venv/bin/python\r\nInstalling setuptools, pip, wheel...done.\r\nroot@localhost ~/test# source venv/bin/activate.fish\r\n(venv) root@localhost ~/test# pip install flask > /dev/null ^ /dev/null\r\n(venv) root@localhost ~/test# ls venv/lib/python2.7/site-packages/\r\nclick/                flask/                        itsdangerous.pyc       MarkupSafe-0.23.dist-info/  setuptools/                   wheel/\r\nclick-6.6.dist-info/  Flask-0.11.1.dist-info/       jinja2/                pip/                        setuptools-23.1.0.dist-info/  wheel-0.29.0.dist-info/\r\neasy_install.py       itsdangerous-0.24.dist-info/  Jinja2-2.8.dist-info/  pip-8.1.2.dist-info/        werkzeug/\r\neasy_install.pyc      itsdangerous.py               markupsafe/            pkg_resources/              Werkzeug-0.11.10.dist-info/\r\n(venv) root@localhost ~/test# zappa deploy\r\nPackaging project as zip...\r\nUploading zip (3.7MiB)...\r\n  0%|                                                                                                                                       | 0.00/3.89M [00:00<?, ?it/s]\r\nScheduling keep-warm..\r\nCreating API Gateway routes..\r\n108it [00:14,  7.29it/s]\r\nDeploying API Gateway..\r\nYour Zappa deployment is live!: https://z02c6ub6x9.execute-api.us-east-1.amazonaws.com/test1\r\n(venv) root@localhost ~/test# zappa tail\r\n[1467133943052] module initialization error: Attempted relative import in non-package\r\n[1467133969117] module initialization error: Attempted relative import in non-package\r\n[1467133971806] module initialization error: Attempted relative import in non-package\r\n[1467134028611] module initialization error: Attempted relative import in non-package\r\n[1467134037963] module initialization error: Attempted relative import in non-package\r\n```"}}
{"actor":{"display_login":"mgalvey"}}