I expect that the generated metadata.yaml would at least either warn me about the situation - or even better - charm create would not populate with chars that are doomed to fail which leads up to an uncaught exception.
Although its evident that this is the problem and the fix is obvious to me. Its not cool to produce a charm from the tool that by no means is usable and also causes build havoc which requires knowledge in python to understand even for someone that tries to produce a "bash" charm.
What I got
$ charm build
build: DEPRECATED: implicit series; specify series in metadata.yaml instead
build: Build dir not specified via command-line or environment; defaulting to /tmp/charm-builds
build: Please add a `repo` key to your layer.yaml, with a url from which your layer can be cloned.
build: Destination charm directory: /tmp/charm-builds/hooker
build: The top level layer expects a valid layer.yaml file
build: Processing layer: hooker (from .)
Traceback (most recent call last):
File "/snap/charm/320/bin/charm-build", line 9, in <module>
load_entry_point('charm-tools==2.5.2', 'console_scripts', 'charm-build')()
File "/snap/charm/320/lib/python3.5/site-packages/charmtools/build/builder.py", line 924, in main
lint, exit_code = proof.proof(build.target_dir, False, False)
File "/snap/charm/320/lib/python3.5/site-packages/charmtools/proof.py", line 65, in proof
lint, err_code = c.proof()
File "/snap/charm/320/lib/python3.5/site-packages/charmtools/charms.py", line 324, in proof
validate_maintainer(charm, lint)
File "/snap/charm/320/lib/python3.5/site-packages/charmtools/charms.py", line 923, in validate_maintainer
formatted = email.utils.formataddr((name, address))
File "/snap/charm/320/usr/lib/python3.5/email/utils.py", line 91, in formataddr
address.encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xf6' in position 6: ordinal not in range(128)
What version am I running?
I am using: Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic
Issue
I create a new charm with:
The generated metadata.yaml gets populated with my name which contains "non english" chars. In my case "Ö" which is a swedish character.
This blows up the following build.
The metadata.yaml content that blows it all up:
I expected the following
I expect that the generated metadata.yaml would at least either warn me about the situation - or even better - charm create would not populate with chars that are doomed to fail which leads up to an uncaught exception.
Although its evident that this is the problem and the fix is obvious to me. Its not cool to produce a charm from the tool that by no means is usable and also causes build havoc which requires knowledge in python to understand even for someone that tries to produce a "bash" charm.
What I got
$ charm build