Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode errors when creating a new operator-framework charm. #577

Open
3 tasks done
tlm opened this issue Jul 20, 2020 · 0 comments
Open
3 tasks done

Unicode errors when creating a new operator-framework charm. #577

tlm opened this issue Jul 20, 2020 · 0 comments

Comments

@tlm
Copy link
Member

tlm commented Jul 20, 2020

Checklist

  • Confirmed this is an issue with charm-tools, not charmstore-client
  • Provide versions of tools used
  • Described the feature or ways to replicate the issue

What version am I running?

I ran the following command: snap info charm and got the following ouput:

name:      charm
summary:   charm and charm-tools
publisher: Canonical✓
contact:   https://discourse.juju.is/c/charming
license:   unset
description: |
  charmstore-client and charm-tools
commands:
  - charm
snap-id:      2Rryoc2ylScfbFl4eQtpntHD9iuZuMvt
tracking:     stable
refresh-date: today at 01:03 AEST
channels:
  stable:    2.7.7 2020-07-20 (502) 117MB classic
  candidate: 2.7.7 2020-07-20 (502) 117MB classic
  beta:      2.7.7 2020-07-20 (502) 117MB classic
  edge:      2.7.7 2020-07-20 (502) 117MB classic
installed:   2.7.7            (502) 117MB classic

I am using: Arch Linux

Issue/Feature

I expect/expected the following

Successfully creating a new charm dir for operator framework

What I got

/var/lib/snapd/snap/charm/502/bin/wrappers/charm: line 8: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
INFO: Generating charm for test1 in ./test1
INFO: No test1 in apt cache; creating an empty charm instead.
User-friendly name for this charm: test1
Developer contact email: thomas.miller@canonical.com
Developer name: tlm
URL where bugs can be filed for this Charm: github.com
Cloning into '/tmp/tmpmzvy_wcg'...
warning: templates not found /snap/charm/502/share/git-core/templates
remote: Enumerating objects: 104, done.
remote: Counting objects: 100% (104/104), done.
remote: Compressing objects: 100% (57/57), done.
remote: Total 104 (delta 35), reused 98 (delta 30), pack-reused 0
Receiving objects: 100% (104/104), 14.95 KiB | 14.95 MiB/s, done.
Resolving deltas: 100% (35/35), done.
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
Traceback (most recent call last):
  File "/snap/charm/502/bin/charm-create", line 33, in <module>
    sys.exit(load_entry_point('charm-tools==2.7.7', 'console_scripts', 'charm-create')())
  File "/snap/charm/502/lib/python3.6/site-packages/charmtools/create.py", line 98, in main
    generator.create_charm()
  File "/snap/charm/502/lib/python3.6/site-packages/charmtools/generators/generator.py", line 82, in create_charm
    self.plugin.create_charm(user_config, tempdir)
  File "/snap/charm/502/lib/python3.6/site-packages/charmtools/templates/operator_python/template.py", line 74, in create_charm
    self._template_file(config, path.join(root, outfile))
  File "/snap/charm/502/lib/python3.6/site-packages/charmtools/templates/operator_python/template.py", line 90, in _template_file
    template = Template(file=outfile, searchList=(config))
  File "/snap/charm/502/lib/python3.6/site-packages/Cheetah/Template.py", line 1281, in __init__
    self._compile(source, file, compilerSettings=compilerSettings)
  File "/snap/charm/502/lib/python3.6/site-packages/Cheetah/Template.py", line 1573, in _compile
    keepRefToGeneratedCode=True)
  File "/snap/charm/502/lib/python3.6/site-packages/Cheetah/Template.py", line 752, in compile
    settings=(compilerSettings or {}))
  File "/snap/charm/502/lib/python3.6/site-packages/Cheetah/Compiler.py", line 1551, in __init__
    source = f.read()
  File "/snap/charm/502/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 79: ordinal not in range(128)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant