aws-cloudformation / aws-cloudformation/cloudformation-cli

cfn-init causes error "The 'rpdk.core.project' package was not installed in a way that PackageLoader understands"

Open
#764 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
336
Forks
172
Avg merge
3d 5m
Merged PRs (30d)
3

Description

Hi, I am trying to run cfn init to create my new resource and I keep getting the following error

```
=== Unhandled exception ===
Please report this issue to the team.
Issue tracker: github.com/aws-cloudformation/cloudformation-cli/issues
Please include the log file 'rpdk.log'
```

rpdk.log:

```
[2021-05-19T00:22:27Z] DEBUG - Logging set up successfully
[2021-05-19T00:22:27Z] DEBUG - Running None: Namespace(artifact_type=None, command=, force=False, subparser_name=None, type_name=None, verbose=0, version=False)
[2021-05-19T00:22:27Z] DEBUG - Unhandled exception
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/rpdk/core/cli.py", line 100, in main
args.command(args)
File "/usr/local/lib/python3.7/site-packages/rpdk/core/init.py", line 151, in wrapper
function(args)
File "/usr/local/lib/python3.7/site-packages/rpdk/core/init.py", line 130, in init
project = Project(args.force)
File "/usr/local/lib/python3.7/site-packages/rpdk/core/project.py", line 142, in __init__
loader=PackageLoader(__name__, "templates/"),
File "/usr/local/lib/python3.7/site-packages/jinja2/loaders.py", line 310, in __init__
f"The {package_name!r} package was not installed in a"
ValueError: The 'rpdk.core.project' package was not installed in a way that PackageLoader understands.
```

I saw some issue called out here which the solution did not help me https://github.com/aws-cloudformation/cloudformation-cli/issues/758#issuecomment-841344266

Could you please offer some assistance for what is wrong?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.