Home > Enterprise >  Cannot get cookiecutter to run properly on amazon linux
Cannot get cookiecutter to run properly on amazon linux

Time:07-10

When running this command locally on mac, this works fine. However when running the same command on amazon linux, i get this issue:

command:

cookiecutter -f -v --no-input --config-file config.yaml https://bitbucket.org/project/cookiecutter-template.git --checkout master

config.yaml contents:

default_context:
    module_name: "tf-test"
    module_description: "This module provides resources for the tf-test service in AWS"
    release_date: "2022-06-07"
    terraform_version: "0.11.14"
    owner_email: "[email protected]"
    precommit_version: "0.1.0"

Error code:

DEBUG cookiecutter.config: Loading custom config from config.yaml.
DEBUG cookiecutter.config: config_path is config.yaml
DEBUG cookiecutter.utils: Making sure path exists: /root/.cookiecutters/
DEBUG cookiecutter.vcs: repo_dir is /root/.cookiecutters/cookiecutter-template
DEBUG cookiecutter.main: context_file is /root/.cookiecutters/cookiecutter-template/cookiecutter.json
DEBUG cookiecutter.generate: Context generated is OrderedDict([(u'cookiecutter', OrderedDict([(u'name', u'component-example'), (u'description', u'env-component cookiecutter example'), (u'owner_name', u''), (u'terraform_version', u'0.11.14'), (u'owner_email', u'[email protected]'), (u'precommit_version', u'0.1.0'), (u'jenkins_library', u'poc'), (u'jenkins_library_version', u'master')]))])
Unable to load extension: No module named html.entities

CodePudding user response:

This fixed it for me

source ~/.bash_profile
export PATH="~/.local/bin:$PATH"
python3 -m pip install "cookiecutter==2.1.1"

I was originally doing this:

pip install --user cookiecutter
  • Related