Skip to content
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

AttributeError: 'App' object has no attribute '_features_used' #2113

Open
sumit1912 opened this issue Jul 29, 2024 · 0 comments
Open

AttributeError: 'App' object has no attribute '_features_used' #2113

sumit1912 opened this issue Jul 29, 2024 · 0 comments

Comments

@sumit1912
Copy link

sumit1912 commented Jul 29, 2024

I am creating API gateway by Chalice in my CDK application construct.
I have the below dependency packages:

aws-cdk-lib==2.150.0
constructs>=10.0.0,<11.0.0
aws-cdk.aws-lambda-python-alpha==2.150.0a0
boto3
chalice
chalice[cdkv2]
pyyaml
pylint
pylint-exit
schema
aws_lambda_powertools
aws_assume_role_lib
requests

I am getting error while cdk synth -v

File "/root/venv/lib/python3.11/site-packages/jsii/_runtime.py", line 118, in __call__ -- 863 | inst = super(JSIIMeta, cast(JSIIMeta, cls)).__call__(*args, **kwargs) 864 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 865 | File "/root/venv/lib/python3.11/site-packages/chalice/cdk/construct.py", line 75, in __init__ 866 | self._package_app() 867 | File "/root/venv/lib/python3.11/site-packages/chalice/cdk/construct.py", line 91, in _package_app 868 | api.package_app( 869 | File "/root/venv/lib/python3.11/site-packages/chalice/api/__init__.py", line 27, in package_app 870 | packager.package_app(config, output_dir, stage) 871 | File "/root/venv/lib/python3.11/site-packages/chalice/package.py", line 1481, in package_app 872 | resources = self._resource_builder.construct_resources( 873 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 874 | File "/root/venv/lib/python3.11/site-packages/chalice/package.py", line 115, in construct_resources 875 | application = self._application_builder.build( 876 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 877 | File "/root/venv/lib/python3.11/site-packages/chalice/deploy/appgraph.py", line 29, in build 878 | for function in config.chalice_app.pure_lambda_functions: 879 | ^^^^^^^^^^^^^^^^^^ 880 | File "/root/venv/lib/python3.11/site-packages/chalice/config.py", line 136, in chalice_app 881 | app = v() 882 | ^^^ 883 | File "/root/venv/lib/python3.11/site-packages/chalice/cli/factory.py", line 325, in load_chalice_app 884 | validate.validate_feature_flags(chalice_app) 885 | File "/root/venv/lib/python3.11/site-packages/chalice/deploy/validate.py", line 91, in validate_feature_flags 886 | for feature in chalice_app._features_used: 887 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 888 | AttributeError: 'App' object has no attribute '_features_used' 889 | [13:50:35] failed command: python3 app.py 890 | [13:50:35] Notices refreshed 891 |   892 | Subprocess exited with error 1 893 | [13:50:35] Error: Subprocess exited with error 1 894 | at ChildProcess. (/usr/local/lib/node_modules/aws-cdk/lib/index.js:452:50678) 895 | at ChildProcess.emit (node:events:517:28) 896 | at ChildProcess.emit (node:domain:489:12) 897 | at ChildProcess._handle.onexit (node:internal/child_process:292:12) 898 |   899 | [Container] 2024/07/29 13:50:35.126067 Command did not exit successfully cdk synth -v exit status 1 900 | [Container] 2024/07/29 13:50:35.134211 Phase complete: BUILD State: FAILED_WITH_ABORT 901 | [Container] 2024/07/29 13:50:35.134230 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: cdk synth -v. Reason: exit status 1



I am stuck here for long...Any hint will be highly appreciated :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant