Docker launcher fails with message «/pups/lib/pups/cli.rb:15:in `split': invalid byte sequence in US-ASCII» then container *.yml file contains non-ASCII symbols

AI-generated summary

The Docker launcher fails with an error message when the container’s *.yml file contains non-ASCII symbols, such as internationalized domain names or special characters. dmitry_fedyuk suggests adding a line to encode the configuration file in UTF-8 to fix the issue. However, sam recommends amending the launcher to pass the UTF text instead of forcing encoding. pl3bs asks for clarification on how to implement this solution and shares their own attempts to resolve the issue by changing settings in the yaml file, but to no avail. pl3bs expresses frustration with the lack of an easy solution and considers converting the format in PHP as a last resort, as they want to accommodate advertising in multiple languages.

Non-ASCII symbols in container *.yml file are needed for:

But now it fails:

root /usr/local/discourse # ./launcher rebuild app
Ensuring discourse docker is up to date
Fetching origin
Discourse Docker is up-to-date
Stopping old container

  • /usr/bin/docker stop -t 10 app
    app
    cd /pups && git pull && /pups/bin/pups --stdin
    From GitHub - discourse/pups: Simple yaml based bootstrapper for Linux machines · GitHub
    8d972ab..7d741e1 master → origin/master
    Updating 8d972ab..7d741e1
    Fast-forward
    README.md | 16 ++++++++++++++++
    1 file changed, 16 insertions(+)
    I, [2015-05-25T15:15:11.528613 #41] INFO – : Loading --stdin
    /pups/lib/pups/cli.rb:15:in split': invalid byte sequence in US-ASCII (ArgumentError) from /pups/lib/pups/cli.rb:15:in run’
    from /pups/bin/pups:8:in `’
    06ed9e81b57dd6311fbe5b8d4e81228db044dc677c72ec25110952c757964ac4
    FAILED TO BOOTSTRAP

Maybe it can be fixed in pups/lib/pups/cli.rb at master · discourse/pups · GitHub

by adding the line like

conf = conf.encode("UTF-8")

before the line

split = conf.split("_FILE_SEPERATOR_")
「いいね!」 4

I would not force encoding, instead amend launcher to pass the utf text.

How exactly to go about this?

Someone had an “é” in their hostname earlier today and the same error came up.

I tried changing a few settings within the yaml file to france, but same error occurred.

Which setting to change, and where?

I tried to change:


from .english to france

and


to fr_FR.UTF-8

separately and in combination.

Is there no easy answer here? I tried hacking in the launcher some as well, no dice.

I can convert the format in php before it ever touches the yaml/launcher, but would think this a last option. Am advertising in other languages across the globe, and would rather offer than limit.

再現できなくなりました。