aws-cloudformation / cloudformation-cli

The CloudFormation Provider Development Toolkit allows you to author your own resource providers and modules that can be used by CloudFormation.
Apache License 2.0
316 stars 158 forks source link

Cfn Init Error #949

Closed virtlima closed 1 year ago

virtlima commented 1 year ago

I went to run cfn init and got the following:

=== Unhandled exception === Please report this issue to the team. Issue tracker: github.com/aws-cloudformation/cloudformation-cli/issues Please include this information: Traceback (most recent call last): File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/rpdk/core/cli.py", line 83, in main init_setup_subparser(subparsers, parents) File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/rpdk/core/init.py", line 171, in setup_subparser language_setup_subparser()(language_subparsers, [base_subparser]) File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/pkg_resources/init.py", line 2461, in load self.require(*args, **kwargs) File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/pkg_resources/init.py", line 2484, in require items = working_set.resolve(reqs, env, installer, extras=self.extras) File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/pkg_resources/init.py", line 792, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (MarkupSafe 2.0.1 (/home/ec2-user/environment/CloudFormationCLI/env/lib/python3.7/site-packages), Requirement.parse('MarkupSafe>=2.1.1'), {'werkzeug', 'Werkzeug'})

mmaeng commented 1 year ago

There is a fix that has been merged into the repo but it isn't in the released package yet.

Workaround for now is if you upgrade pip and install again

pip install -U pip
pip install cloudformation-cli

It will be able to be run.