码迷,mamicode.com
首页 > 其他好文 > 详细

【Docker异常】docker-compose up throw UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 97: ordinal not in range(128)

时间:2020-08-05 19:45:33      阅读:103      评论:0      收藏:0      [点我收藏+]

标签:mos   python   package   ecs   style   path   div   stc   error:   

 

一、异常

[root@VM_0_4_centos prometheus-grafana-linux]# docker-compose up
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 9, in <module>
    load_entry_point(docker-compose==1.18.0, console_scripts, docker-compose)()
  File "/usr/lib/python3.4/site-packages/compose/cli/main.py", line 71, in main
    command()
  File "/usr/lib/python3.4/site-packages/compose/cli/main.py", line 121, in perform_command
    project = project_from_options(., options)
  File "/usr/lib/python3.4/site-packages/compose/cli/command.py", line 37, in project_from_options
    override_dir=options.get(--project-directory),
  File "/usr/lib/python3.4/site-packages/compose/cli/command.py", line 87, in get_project
    config_details = config.find(project_dir, config_path, environment, override_dir)
  File "/usr/lib/python3.4/site-packages/compose/config/config.py", line 278, in find
    [ConfigFile.from_filename(f) for f in filenames],
  File "/usr/lib/python3.4/site-packages/compose/config/config.py", line 278, in <listcomp>
    [ConfigFile.from_filename(f) for f in filenames],
  File "/usr/lib/python3.4/site-packages/compose/config/config.py", line 178, in from_filename
    return cls(filename, load_yaml(filename))
  File "/usr/lib/python3.4/site-packages/compose/config/config.py", line 1305, in load_yaml
    return yaml.safe_load(fh)
  File "/usr/lib64/python3.4/site-packages/yaml/__init__.py", line 94, in safe_load
    return load(stream, SafeLoader)
  File "/usr/lib64/python3.4/site-packages/yaml/__init__.py", line 70, in load
    loader = Loader(stream)
  File "/usr/lib64/python3.4/site-packages/yaml/loader.py", line 24, in __init__
    Reader.__init__(self, stream)
  File "/usr/lib64/python3.4/site-packages/yaml/reader.py", line 85, in __init__
    self.determine_encoding()
  File "/usr/lib64/python3.4/site-packages/yaml/reader.py", line 124, in determine_encoding
    self.update_raw()
  File "/usr/lib64/python3.4/site-packages/yaml/reader.py", line 178, in update_raw
    data = self.stream.read(size)
  File "/usr/lib64/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: ascii codec cant decode byte 0xe3 in position 97: ordinal not in range(128)

 

二、解决方案

docker-compose.yml文件去除中文符号就可以了

【Docker异常】docker-compose up throw UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 97: ordinal not in range(128)

标签:mos   python   package   ecs   style   path   div   stc   error:   

原文地址:https://www.cnblogs.com/756623607-zhang/p/13441562.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!