Miserlou / Zappa

Serverless Python
https://blog.zappa.io/
MIT License
11.89k stars 1.2k forks source link

Zappa crashes when running "zappa" #1395

Open cameronk opened 6 years ago

cameronk commented 6 years ago

Context

After two days and two different OS', I finally got Zappa working. For about 5 minutes, until I had to reset my virtual env (Zappa was packaging my entire virtual env, including /lib/, which resulted in ~100mb deploy zips.)

When I reinstalled, I now get this:

camer@DESKTOP-VRG88TF:/mnt/c/Users/camer/Desktop/Development/ryze/content-engine/api$ zappa
Oh no! An error occurred! :(

==============

Traceback (most recent call last):
  File "/home/camer/.local/share/virtualenvs/api-GJXpcMFr/lib/python3.6/site-packages/zappa/cli.py", line 2610, in handle
    sys.exit(cli.handle())
  File "/home/camer/.local/share/virtualenvs/api-GJXpcMFr/lib/python3.6/site-packages/zappa/cli.py", line 505, in handle
    self.dispatch_command(self.command, stage)
  File "/home/camer/.local/share/virtualenvs/api-GJXpcMFr/lib/python3.6/site-packages/zappa/cli.py", line 520, in dispatch_command
    if not self.vargs['json']:
KeyError: 'json'

==============

Need help? Found a bug? Let us know! :D
File bug reports on GitHub here: https://github.com/Miserlou/Zappa
And join our Slack channel here: https://slack.zappa.io
Love!,
 ~ Team Zappa!

Expected Behavior

Zappa should output the usual list of help commands

Actual Behavior

Zappa breaks

Steps to Reproduce

  1. Create a virtual env with pipenv on python 3.6
  2. Run zappa
  3. It breaks

Your Environment

kjenney commented 6 years ago

The same thing is happening to me on OSX with 0.45.1 and Python 3.6.3. I suspect it may be a library issue or something introduced in 3.6.3. This isn't preventing me from using zappa - it's merely an annoyance. Here's my zappa.settings.py:

{
    "dev": {
        "aws_region": "us-east-2",
        "django_settings": "mysite.mysite.settings",
        "profile_name": "default",
        "project_name": "mysite",
        "runtime": "python3.6",
        "s3_bucket": "zappa-a8nviyobq"
    }
}