Error Installing Plone 6 with Cookiecutter

================================================================================
Project Title generation
================================================================================
Running sanity checks
Traceback (most recent call last):
  File "/tmp/tmp6ym1qxl7.py", line 259, in <module>
    main()
  File "/tmp/tmp6ym1qxl7.py", line 235, in main
    if not sanity_check():
  File "/tmp/tmp6ym1qxl7.py", line 213, in sanity_check
    print(f"  - {title}: {msg}")
  File "/usr/lib/python3.8/encodings/iso8859_15.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 19: character maps to <undefined>
ERROR: Stopping generation because pre_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)

Getting this error when running "cookiecutter https://github.com/collective/cookiecutter-plone-starter", can someone help? Thank you!!

I cannot read images of text. Please include text, not an image of text.

Also provide your Python version and operating system.

Oh I'm sorry!! My Python version is 3.8.10 and my Operating System is Linux. Thank you!!

================================================================================
Project Title generation
================================================================================
Running sanity checks
Traceback (most recent call last):
  File "/tmp/tmpz9xx9z4u.py", line 259, in <module>
    main()
  File "/tmp/tmpz9xx9z4u.py", line 235, in main
    if not sanity_check():
  File "/tmp/tmpz9xx9z4u.py", line 213, in sanity_check
    print(f"  - {title}: {msg}")
  File "/usr/lib/python3.8/encodings/iso8859_15.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 19: character maps to <undefined>
ERROR: Stopping generation because pre_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)

This is an interesting, but serious one. At a first look I have no idea whats going on. Would you mind to file an issue at Issues · collective/cookiecutter-plone-starter · GitHub please?

Did it!! Also I think it's important to say that I'm using Bitvise SSH, maybe has something to do with it!

1 Like

Just out of curiosity: what was your project title?

I was testing, so kept it as default (Project Title)!

Seems you're using iso8859_15 in the terminal which does not support unicode chars like âś“ or python thinks you're using iso8859_15

1 Like

Yes, it could be that, but how would I solve the problem?

$ locale -a

shows your current locale. It should have utf8 as encoding instead of iso8859_15. Mine is

$ locale -a
C
C.UTF-8
it_IT.utf8
POSIX
2 Likes

Ok, I think this is the problem, because mine is:

C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
portuguese
POSIX
pt_PT
pt_PT@euro
pt_PT.iso88591
pt_PT.iso885915@euro

It was it, I had to reconfigure locales and it's working!! Thank you!!

3 Likes