-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suddenly getting traceback: AttributeError: 'NoneType' object has no attribute 'items' #6014
Comments
Hi there, would you mind sharing that simple template so that I can investigate? |
I stress that this was not happening before. I've never seen this before. And the template is dirt simple: AWSTemplateFormatVersion: 2010-09-09
Transform:
- AWS::LanguageExtensions
- AWS::Serverless-2016-10-31
Description:
Foo service.
Parameters:
Env:
Description: The token identifying the deployment environment, such as "dev", "dev3", or "dev-jdoe".
Type: String
AllowedPattern: '\w[\w-]*'
ConstraintDescription: The development environment identifier must only use word characters and dashes.
Globals:
Function:
Runtime: java17
Architectures: [x86_64]
MemorySize: 800
Timeout: 4 aws/serverless-application-model#4 s
Resources:
LambdaHandler:
Type: AWS::Serverless::Function
Properties:
FunctionName: !Sub "foo-${Env}-LambdaHandler"
CodeUri: !Sub "s3://foo-${Env}-staging/foo-aws-lambda.zip"
Handler: com.example.LambdaHandler::handleRequest This is being invoked from Git Bash using the following command: sam deploy \
--profile $awsProfile \
--template-file "$samTemplateFile" \
--stack-name $stackName \
--s3-bucket $stagingBucketName \
--capabilities CAPABILITY_NAMED_IAM \
--parameter-overrides Env=$env Note that there is no SAM config file. I shouldn't need one—everything is being passed on the command line. Furthermore, as I mentioned, it worked fine before. |
Unfortunately I'm unable to reproduce the issue you described. Here is my full log. I used the same template you provided, except updating the Here is the template I used:
Here is the log of my deployment process:
|
Have you run |
I don't use From your output it seems that you are not running the exact command I provided; thus we don't know if you can reproduce the issue or not. |
If you decide to run the exact command I'm running, don't forget to delete the |
Maybe this ticket is better moved to https://github.com/aws/aws-sam-cli/ ? |
Yes, I confirmed that the template has no transform issue. Will move to SAM CLI instead. |
After a reboot the error is no longer occurring. I also remember that the error started occurring after I used a VPN and then turned off the VPN. Is it possible that Python could be caching some sort of network configuration from the VPN? I don't have time to test the VPN again at the moment, but I wanted to leave this extra detail. |
I tried to reproduce this @garretwilson but could not. It's strange that it was transient and its no longer manifesting when turning off the VPN. It should not have any bearing on this. 🤔 |
It is strange, but to clarify, when this happened I had just turned off the VPN and it happened with the VPN off. I was thinking Python had cached some network routing or DNS entry or something while the VPN was on, and was still trying to access that with the VPN off. Just a wild guess. Today I tried the same VPN connection, and used SAM both with the VPN on and after turning off the VPN connection. The problem did not occur. Thus at the moment I cannot reproduce it either. |
Closing this issue as it seems like a transient issue which cannot be reproduced. Feel free to open a new issue if you still face similar issues with the latest SAM CLI version or have steps to reproduce it. |
|
I'm on Windows 10. A day or two ago I updated to SAM CLI, version 1.97.0. I don't know for sure if it's related to the upgrade, but now deploying a very simple template gives me:
Why?!
The text was updated successfully, but these errors were encountered: