Invoke python lambda locally attribute error

When running the following…

serverless invoke local --function migrate --data '{"a":"bar"}'

I experience the following error…

Traceback (most recent call last):
  File "/usr/local/lib/node_modules/serverless/lib/plugins/aws/invokeLocal/invoke.py", line 59, in <module>
    event = json.load(sys.stdin)

AttributeError: 'module' object has no attribute 'load'

Anyone have any idea why?

1 Like

Maybe this bug report could be relevant: https://github.com/serverless/serverless/issues/4663