Diagnostic ID 9F77D425-42B9-4F96-9C8B-7154DDF17AC9/2017-07-13_11-03-12
PS D:\Work\Imho\Api> docker-compose -f docker-compose.yml up
Creating network "api_default" with the default driver
Pulling ignite (apacheignite/ignite:latest)...
latest: Pulling from apacheignite/ignite
5040bd298390: Pulling fs layer
fce5728aad85: Pulling fs layer
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose\cli\main.py", line 68, in main
File "compose\cli\main.py", line 118, in perform_command
File "compose\cli\main.py", line 926, in up
File "compose\project.py", line 401, in up
File "compose\service.py", line 305, in ensure_image_exists
File "compose\service.py", line 1001, in pull
File "compose\progress_stream.py", line 37, in stream_output
File "codecs.py", line 370, in write
File "site-packages\colorama\ansitowin32.py", line 40, in write
File "site-packages\colorama\ansitowin32.py", line 141, in write
File "site-packages\colorama\ansitowin32.py", line 169, in write_and_convert
File "site-packages\colorama\ansitowin32.py", line 174, in write_plain_text
IOError: [Errno 0] Error
Failed to execute script docker-compose
docker-compose.yml:
version: '3'
services:
ignite:
image: apacheignite/ignite
This error only happens on one of my 3 machines, so I have no idea what causes it. Resetting to factory defaults or reinstalling docker doesn't help. Without docker compose the image is pulling and then working fine. All the machines are on windows 10 and latest stable docker installed.
Looks like you're running into https://github.com/tartley/colorama/issues/101
Are you able to change the default encoding on that machine to use UTF-8? This resource would be a good start.
Encoding change doesn't help. However, what I've found during testing is that it only happens in VSCode, where I'm working. It internally runs PowerShell which fails, but if I run PowerShell manually without VSCode, it works. Looks like it is VSCode only issue, so I'm closing the ticket
Diagnostic ID: DF9BA1B4-FD8A-4953-A1C0-7293B61C5149/2017-11-01_12-51-34
When I run docker-compose in a standalone Powershell, this issue does not come out, BUT it hangs at random steps during the image build process. Trying to interrupt process with CTRL+C produces - after a long time - you can see this stack trace that pointed me to this issue.
```
[...]
---> Running in 9bd4a536c9fc
---> 9eb9a90e0501
Step 26/70 : USER root
---> Running in ba492d308e75
---> 37395f008135
Step 27/70 : RUN if [ ${INSTALL_YARN} = true ]; then echo "" >> ~/.bashrc && echo 'export YARN_DIR="/home/laradock/.yarn"' >> ~/.bashrc && echo 'export PATH="$YARN_DIR/bin:$PATH"' >> ~/.bashrc ;fi
---> Running in 71dec9b40ab0
GTraceback (most recent call last):
File "docker-compose", line 6, in
File "compose\cli\main.py", line 68, in main
File "compose\cli\main.py", line 121, in perform_command
File "compose\cli\main.py", line 978, in up
File "contextlib.py", line 35, in __exit__
File "compose\cli\main.py", line 1256, in up_shutdown_context
File "site-packages\colorama\ansitowin32.py", line 40, in write
File "site-packages\colorama\ansitowin32.py", line 141, in write
File "site-packages\colorama\ansitowin32.py", line 169, in write_and_convert
File "site-packages\colorama\ansitowin32.py", line 174, in write_plain_text
IOError: [Errno 0] Error
Failed to execute script docker-compose
`
May the hanging issue be related to this?
@Lanayx Yeah, It works for me too. Hyper.js also have this issue.
@AnnatarHe did you find any way to solve this issue using Hyper.js?
@mickael83 no... Maybe all electron based apps have this issue.
I confirm same behavior with native powershell. It started to fail after a windows update.
In powershell the error do not show up until you kill the process.
In vs code it shows directly which lead you to think it's a vs code error only.
same issue here. did not work in integrated vscode powershell, but ran fine in powershell.
I confirm the behavior reported by @Tetraib. This issue should be reopened and investigated because could make the product unreliable and unusable.
@gpunx in powershell it appears to work better (does not fail as much as with vs code) the bug is sometimes not easy to pick up it's very random.
I'm developing a nodejs API which restart on code change. I spam ctrl-s key and usually after 10 or so it fails silently until you kill the process.
@klinamen I agree, it is very unreliable and unusable
As a workaround in native powershell you can do the following
It stops failing in native powershell (does not works for vs code)
Got the same error if running docker with much output (e.g. configure/compiling in container). It get's a littlebit better if i redirect the outputs to /dev/null
鈧琩it:
Error occurs in CMD and Powershell.
Running in a gitbash is just fine.
Maybe it is a buffer problem?
Confirming the issue occurs in VSCode's terminal and PowerShell, but works in GitBash.
I have this problem in CMD, PowerShell, and Git-bash - regardless of running stand-alone or integrated. Fiddling with the code page did nothing, but setting the --no-ansi
flag on docker-compose seems to resolve the issue (presumably by bypassing colorama).
Replying here because it's high in the google results for the stack trace, the --no-ansi
flag was suggested here; https://github.com/docker/compose/issues/5263
Same problem in Intellij/Webstorm terminal
IOError: [Errno 0] Error
Failed to execute script docker-compose
but works in git-bash for Windows or cmder. The --no-ansi option does not help in Intellij.
Works for me in Cygwin and Powershell, doesn't work if I use Cygwin as IntelliJ terminal. Something must be bugged with the script.
+1 here... watching
Looks like this is an issue with VSCode and Intellij's integrated terminals.
Fails in
Works in
Hey folks, the root cause for this issue is a bug in Windows as described here: https://github.com/Microsoft/vscode/issues/36630#issuecomment-350063413
There's nothing that can be done on our end to mitigate this, although running with the --no-ansi
_might_ help in the meantime.
Thank you for your understanding.
That's weird because in my case docker-compose sometimes works in webstorm terminal and sometimes not then it throws error:
IOError: [Errno 0] Error
Failed to execute script docker-compose
Then i use windows powershell and it's ok
to add to @WyrdNexus comment above. The same error occurs when I use docker-compose on windows with the pycharm terminal (which is another jetbrains IDE like intellij)
This occurs for me on both native powershell and cmd.
Works in Powershell, but crashes in Hyper or VSCode shell
And while running the script in Powershell window, it opened this window to demand access to my E:\ drive where the code is.
I have same problems. In cmd docker-compose doesn't work. But It sometimes works in powershell. Luckily, in git bash console I could build images.
I'm locking this thread so the relevant information doesn't get buried with people reporting the same issue over and over.
Please refer to this comment for the identified cause and proposed mitigation ; people affected will have to arm themselves with patience and make sure to update Windows when the fix comes out.
Most helpful comment
Encoding change doesn't help. However, what I've found during testing is that it only happens in VSCode, where I'm working. It internally runs PowerShell which fails, but if I run PowerShell manually without VSCode, it works. Looks like it is VSCode only issue, so I'm closing the ticket