chalice icon indicating copy to clipboard operation
chalice copied to clipboard

Chalice not working and throwing Required parameter name not set

Open abdullah353 opened this issue 8 years ago • 5 comments

I was previously using Ubuntu machine to deploy the code and it's working perfectly fine. Now i switched on Mac osHigh, and getting the following error:

$chalice deploy --stage development
Required parameter name not set

To me it's look like boto3 issue. I have doubled checked my ~/.aws credentials files also i tried to export AWS credentials into environment variables. But no luck.

My installation steps were

$ python --version
Python 2.7.14

$ virtualenv venv
source venv/bin/activate

$ pip install -r requirements-dev.txt

$chalice local --port=8080
Required parameter name not set

Any help on it ?

abdullah353 avatar Jan 09 '18 03:01 abdullah353

If I am not mistaken, you need Python 3.6 to use Chalice.

EDIT: Nevermind, it seems Chalice does support Python 2.7.

However, if it is failing on chalice local, I doubt it is a boto3 issue...

aalvrz avatar Jan 09 '18 03:01 aalvrz

It have figured out the the cause of the issue, I was using dynamodb on my app.py and getting the name of the table from environment variable the shortcode looks like following:

table = dynamodb.Table(os.environ.get('TABLE_NAME'))

The error i was receiving does not make any sense to me so the way i have debugged this issue is by removing the global exception over here https://github.com/aws/chalice/blob/master/chalice/cli/init.py#L370 then it throws me the stack trace of my app.

What is the best way to get stack trace back from such situations ?

abdullah353 avatar Jan 09 '18 18:01 abdullah353

I actually sometimes remove that except statement as well when I am debugging an error that I don't understand. Chalice does have the --debug flag that you can try but the Chalice library does not have too many logging statements in the codebase so it can be hit or miss. What does the output look like when you run chalice --debug deploy? Would you be able to debug from that?

kyleknap avatar Jan 10 '18 03:01 kyleknap

The output is same using --debug parameter

$ chalice --debug deploy --stage development 
Required parameter name not set

It would be great if we add a traceback call when --debug is true while capturing the global exception as well.

Thanks

abdullah353 avatar Jan 10 '18 04:01 abdullah353

The current master branch of Chalice now spits out a full stacktrace by default when it runs into an error. I'll close this issue since it looks like you managed to figure out the problem anyway, should be easier with the next release of Chalice though.

stealthycoin avatar Apr 02 '18 19:04 stealthycoin