Skip to content

IOError: [Errno 0] Error. on Windows. #5019

Closed

Description

@Lanayx

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.

Activity

  1. shin- commented on Jul 13, 2017

    @shin-

    Looks like you're running into tartley/colorama#101

    Are you able to change the default encoding on that machine to use UTF-8? This resource would be a good start.

  2. Lanayx commented on Jul 14, 2017

    @Lanayx
    Author

    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

  3. klinamen commented on Nov 1, 2017

    @klinamen

    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 <module>
      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?
    
  4. AnnatarHe commented on Nov 2, 2017

    @AnnatarHe

    @Lanayx Yeah, It works for me too. Hyper.js also have this issue.

  5. m1kl commented on Nov 15, 2017

    @m1kl

    @AnnatarHe did you find any way to solve this issue using Hyper.js?

  6. AnnatarHe commented on Nov 16, 2017

    @AnnatarHe

    @Mickael83 no... Maybe all electron based apps have this issue.

  7. Tetraib commented on Nov 22, 2017

    @Tetraib

    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.

    docker-compose colorama bug

  8. gpunx commented on Nov 22, 2017

    @gpunx

    same issue here. did not work in integrated vscode powershell, but ran fine in powershell.

  9. klinamen commented on Nov 23, 2017

    @klinamen

    I confirm the behavior reported by @Tetraib. This issue should be reopened and investigated because could make the product unreliable and unusable.

  10. Tetraib commented on Nov 23, 2017

    @Tetraib

    @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

    1. Execute chcp in cmd which returned 850 in my case
    2. Execute chcp 850 in powershell

    It stops failing in native powershell (does not works for vs code)

  11. Speedy1991 commented on Nov 25, 2017

    @Speedy1991

    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

    €dit:
    Error occurs in CMD and Powershell.
    Running in a gitbash is just fine.
    Maybe it is a buffer problem?

  12. mtpultz commented on Nov 26, 2017

    @mtpultz

    Confirming the issue occurs in VSCode's terminal and PowerShell, but works in GitBash.

  13. FluffierThanThou commented on Nov 27, 2017

    @FluffierThanThou

    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; #5263

  14. dschulten commented on Dec 11, 2017

    @dschulten

    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.

  15. luxalpa commented on Dec 11, 2017

    @luxalpa

    Works for me in Cygwin and Powershell, doesn't work if I use Cygwin as IntelliJ terminal. Something must be bugged with the script.

  16. navossoc commented on Dec 12, 2017

    @navossoc

    +1 here... watching

  17. WyrdNexus commented on Dec 13, 2017

    @WyrdNexus

    Looks like this is an issue with VSCode and Intellij's integrated terminals.

    Intellij Issue IDEA-181817

    Fails in

    • Intellij powershell terminal
    • intellij cmd terminal
    • VScode

    Works in

    • Git-Bash: MINGW64
    • CMD terminal
    • Powershell terminal
  18. shin- commented on Dec 13, 2017

    @shin-

    Hey folks, the root cause for this issue is a bug in Windows as described here: microsoft/vscode#36630 (comment)

    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.

  19. SkylinR commented on Dec 19, 2017

    @SkylinR

    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

  20. Ymasri93 commented on Jan 6, 2018

    @Ymasri93

    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)

  21. dyangelo-grullon commented on Jan 7, 2018

    @dyangelo-grullon

    This occurs for me on both native powershell and cmd.
    cmd_docker_compose_issue
    powershell_docker_compose_issue

  22. theel0ja commented on Feb 1, 2018

    @theel0ja

    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.
    image

  23. yakovenkoroman1993 commented on Feb 5, 2018

    @yakovenkoroman1993

    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.
    image

  24. shin- commented on Feb 5, 2018

    @shin-

    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.

  25. locked and limited conversation to collaborators on Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions