question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stopping generation because pre_gen_project hook script didn't exit successfully

See original GitHub issue

File "/tmp/tmpoJStZp.py", line 17 return f"{code}{text}{bcolors.ENDC}" ^ SyntaxError: invalid syntax ERROR: Stopping generation because pre_gen_project hook script didn't exit successfully Hook script failed (exit status: 1)

Looks like it broke recently. Made it work by checking out to a week old version.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sergioisidorocommented, Nov 12, 2019

Seems to be working with virtualenv. The solution of aliasing python to python3 binary on MacOS seems not to be very reliable with cookiecutter

Leaving this here for people looking for a quick solution with virtualenv

## After installing python 3
unalias python # if you have python aliased to python3 
virtualenv -p python3 venv   
source venv/bin/activate 
## Run cookiecutter
deactivate # or not :)

0reactions
sergioisidorocommented, Nov 12, 2019

I have an alias of python to python3 (3.7), but it’s on my shell rc (osx). I guess cookiecutter picks up python from the path instead?

But yes, it seems that this was the first breaking change to python 2.7, so it’s nice if there would be a clear readme warning 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

python 3.x - pre_gen_project hook script didn't exit successfully
Generating a dash component project using cookiecutter. Followed the installation guide of dash-component-boilerplate: ...
Read more >
Stopping generation because post_gen_project hook script ...
Stopping generation because post_gen_project hook script didn't exit successfully Hook script failed (exit status: 1) #9.
Read more >
Using Pre/Post-Generate Hooks (0.7.0+) - Cookiecutter
If a hook script fails (that is, if it finishes with a nonzero exit status), the project generation will stop and the generated...
Read more >
Cookiecutter Template - Show and Tell - Anvil Works
(Cookiecutter is a tool for creating new projects from templates. ... ERROR: Stopping generation because post_gen_project hook script didn't ...
Read more >
TIP 45 Detoxification and Substance Abuse Treatment
A successful detoxification process can be measured, in part, by whether an individual who is substance dependent enters and.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found