简体   繁体   English

docker ddev .UnicodeDecodeError: 'utf-8' 编解码器无法解码位置 235 中的字节 0xe9:继续字节无效

[英]docker ddev .UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 235: invalid continuation byte

I'm currently running in such a tricky error.我目前正在运行一个如此棘手的错误。 I'm running ddev on Windows 10. It seems, the problem is my name "André Kraus", because of the "é" inside.我在 Windows 10 上运行 ddev。看来,问题是我的名字“André Kraus”,因为里面有“é”。 In the past it works fine with a [path-to-project]/.ddev/docker-compose.environment.yaml, set my username to "andrekraus"过去它与 [path-to-project]/.ddev/docker-compose.environment.yaml 一起工作正常,将我的用户名设置为“andrekraus”

version: '3.6'
services:
  web:
    build:
      args:
        username: andrekraus
  db:
    build:
      args:
        username: andrekraus

But since yesterday, there occurs a new challenge.但从昨天开始,出现了新的挑战。 When I type in ddev start it ends up with:当我输入 ddev start 时,它以:

$ ddev start
Starting ddev-test-4...
.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 235: invalid continuation byte
Failed to start ddev-test-4: failed to start ddev-ssh-agent: Failed to run docker-compose [-f C:\Users\André Kraus/.ddev/.ssh-auth-compose-full.yaml -p ddev-ssh-agent up --build --force-recreate -d], err='exit status 1', stdout='', stderr='.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 235: invalid continuation byte'

I tried to fix that in my docker-compose.environment.yaml with我试图在我的 docker-compose.environment.yaml 中修复它

version: '3.6'
services:
  web:
    build:
      args:
        username: andrekraus
  db:
    build:
      args:
        username: andrekraus
  ddev-ssh-agent:
    build:
      args:
        username: andrekraus

but this didn't effect anything.但这没有任何影响。 The problem occurs for sure in the C:\\Users\\André Kraus.ddev.ssh-auth-composer-full.yaml (screenshot) in my user directory, but how can I manage the settings there?问题肯定出现在我的用户目录中的 C:\\Users\\André Kraus.ddev.ssh-auth-composer-full.yaml(屏幕截图)中,但是我如何管理那里的设置?

enter image description here在此处输入图片说明

Fix the utf-8 Problem:修复 utf-8 问题:

Overwrite the name in the [path-to-project]/.ddev/docker-compose.env.yaml:覆盖 [path-to-project]/.ddev/docker-compose.env.yaml 中的名称:

version: '3.6'
services:
  web:
    build:
      args:
        username: andrekraus
  db:
    build:
      args:
        username: andrekraus

Then in ~/.ddev (in my example on Windows it is C:\\Users\\André Kraus.ddev ) create new the file ssh-auth-compose.environment.yaml:然后在 ~/.ddev (在我在 Windows 上的示例中,它是 C:\\Users\\André Kraus.ddev )创建新文件 ssh-auth-compose.environment.yaml:

version: '3.6'

services:
  ddev-ssh-agent:
    build:
      args:
        username: andrekraus

This solves the problem with the username, but I didn't get the path working.这解决了用户名的问题,但我没有让路径工作。 So at the moment, I omit the ddev-ssh-agent.所以目前,我省略了 ddev-ssh-agent。

Omit the ddev-ssh-agent省略 ddev-ssh-agent

Add my configuration to the config, create new file [path-to-project]/.ddev/config.user.yaml:将我的配置添加到配置中,创建新文件 [path-to-project]/.ddev/config.user.yaml:

omit_containers: [ddev-ssh-agent]

Clear restart needed for ddev ddev 需要清除重启

So after that, I had some issues to get it working again.所以在那之后,我遇到了一些问题才能让它再次工作。 I did ddev poweroff and then docker ps -a .我做了ddev poweroff然后ddev poweroff docker ps -a The list shows some containers running, I had to stop them all ( docker-compose down in the project directories) so that docker ps -a shows an empty list.该列表显示了一些正在运行的容器,我不得不将它们全部停止(项目目录中的docker-compose down ),以便docker ps -a显示一个空列表。

After that, ddev start works again.之后, ddev start再次工作。

Thank you so much @rfay for your help!非常感谢@rfay的帮助!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UnicodeDecodeError:“utf-8”编解码器无法解码 position 35 中的字节 0x96:无效的起始字节 - UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 35: invalid start byte UnicodeDecodeError:“utf8”编解码器无法解码 position 中的字节 0x92 377826:无效的起始字节 - UnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in position 377826: invalid start byte 升级pip时出错:UnicodeDecodeError:'utf-8'编解码器无法解码字节 - Error while upgrading pip: UnicodeDecodeError: 'utf-8' codec can't decode byte UnicodeDecodeError: &#39;charmap&#39; 编解码器无法解码位置 73776 中的字节 0x81 - UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 73776 "UnicodeDecodeError:“charmap”编解码器无法解码位置 X 中的字节 0x9d:字符映射到<undefined>" - UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position X: character maps to <undefined> 如何修复 UnicodeDecodeError:“ascii”编解码器无法在 Windows 上解码字节 - how to fix UnicodeDecodeError: 'ascii' codec can't decode byte on windows UnicodeDecodeError:“charmap”编解码器无法解码 position 2310 中的字节 0x81:字符映射到<undefined></undefined> - UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2310: character maps to <undefined> UnicodeDecodeError:“charmap”编解码器无法解码 position 8024 中的字节 0x9d:字符映射到<undefined>将 output 重定向到磁盘时</undefined> - UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 8024: character maps to <undefined> when re-directing output to disk Nokogiri gemspec在Windows平台上的jruby中UTF-8中的无效字节序列 - Nokogiri gemspec invalid byte sequence in UTF-8 in jruby on windows platform Windows 上的 Cocoapods UTF-8 错误中的无效字节序列 - Cocoapods on Windows invalid byte sequence in UTF-8 error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM