You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to mount volumes on Windows 10: UnboundLocalError: local variable 'cells_to_erase' referenced before assignment #5263
I am getting a persistent error on docker-compose up. I am getting the same error on two different Windows 10 Pro machines.
Traceback (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 954, in up
File "compose\cli\log_printer.py", line 105, in run
File "compose\cli\log_printer.py", line 109, in write
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 167, in write_and_convert
File "site-packages\colorama\ansitowin32.py", line 181, in convert_ansi
File "site-packages\colorama\ansitowin32.py", line 212, in call_win32
File "site-packages\colorama\winterm.py", line 132, in erase_screen
UnboundLocalError: local variable 'cells_to_erase' referenced before assignment
Failed to execute script docker-compose
After the error the port is open and the application is running, but the volumes are not mounted. Here is my setup:
# Use an official Ubuntu Xenial as a parent image
FROM ubuntu:16.04
# Install Node.js 8 and npm 5
RUN apt-get update
RUN apt-get -qq upgrade
RUN apt-get install -y build-essential
RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
RUN apt-get install -y nodejs
# Set the working directory to /pretty-prism
WORKDIR /pretty-prism
# Copy the package.json into the container at /pretty-prism
COPY package.json /pretty-prism
# Install any needed packages specified in package.json
RUN npm install
# Define environment variable
# Make port 8080 available to the world outside this container
EXPOSE 8080
# Run `npm start` when the container launches
CMD ["npm", "start"]
This looks to be a bug in one of our dependencies. I created an issue report upstream. In the meantime, You might be able to circumvent the issue using the --no-ansi flag. Let me know if that helps!
Traceback (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 954, in up
File "compose\cli\log_printer.py", line 105, in run
File "compose\cli\log_printer.py", line 109, in write
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 167, in write_and_convert
File "site-packages\colorama\ansitowin32.py", line 181, in convert_ansi
File "site-packages\colorama\ansitowin32.py", line 212, in call_win32
File "site-packages\colorama\winterm.py", line 132, in erase_screen
UnboundLocalError: local variable 'cells_to_erase' referenced before assignment
Failed to execute script docker-compose
@AkimaLunar6d1ac219 is the commit for the 1.16.1 release, it doesn't correspond to the binary I linked to. To confirm, the build number you should see when testing is d601408c.
@shin-, I am probably not installing it correctly. I am just running the .exe (as an admin) and restarting Docker. Is there something else/differently I need to do?
@AkimaLunar To test the binary you downloaded, you'll have to replace docker-compose in your commands with the full path to the new binary, so instead of docker-compose up, something like C:\Users\Username\Downloads\docker-compose.exe up
Yup! That solved the issue. I am now getting a more helpful error:
ERROR: for preact Cannot start service preact: error while creating mount source path '/C/Users/akima/Documents/GitHub/pretty-prism-preact': mkdir /C/Users/akima/Documents: permission denied
ERROR: Encountered errors while bringing up the project.
Thanks, @shin- ! I feel like this issue can be closed now.
Activity
shin- commentedon Oct 13, 2017
This looks to be a bug in one of our dependencies. I created an issue report upstream. In the meantime, You might be able to circumvent the issue using the
--no-ansiflag. Let me know if that helps!AkimaLunar commentedon Oct 14, 2017
Thanks, @shin- ! Nope, getting the same error with the flag.
First, the application in the container starts and the exposed port works fine too. But then after any change in files, I get that error.
shin- commentedon Oct 17, 2017
@AkimaLunar Does this binary fix your issue?
AkimaLunar commentedon Oct 18, 2017
Sorry, still getting the same error.
shin- commentedon Oct 19, 2017
That's odd. What's the output of the
versionsubcommand with the alternative binary?AkimaLunar commentedon Oct 23, 2017
It's
docker-compose version 1.16.1, build 6d1ac219.shin- commentedon Oct 23, 2017
@AkimaLunar
6d1ac219is the commit for the 1.16.1 release, it doesn't correspond to the binary I linked to. To confirm, the build number you should see when testing isd601408c.aleho70 commentedon Oct 24, 2017
d601408cis not working,--no-ansiis mentioned only in main help, but it is not possible to use it withbuildorupshin- commentedon Oct 24, 2017
@aleho70 Could you be more specific? What do you mean when you say d601408 is not working? Do you get the same error message? Something else?
As for
--no-ansi, it can be used with any subcommand.AkimaLunar commentedon Oct 25, 2017
@shin-, I am probably not installing it correctly. I am just running the .exe (as an admin) and restarting Docker. Is there something else/differently I need to do?
AnnatarHe commentedon Oct 29, 2017
Same issue here.
AkimaLunar commentedon Nov 1, 2017
Just wanted to clarify, that the same config works fine on a Mac, including volumes.
shin- commentedon Nov 1, 2017
@AkimaLunar To test the binary you downloaded, you'll have to replace
docker-composein your commands with the full path to the new binary, so instead ofdocker-compose up, something likeC:\Users\Username\Downloads\docker-compose.exe upAkimaLunar commentedon Nov 2, 2017
Yup! That solved the issue. I am now getting a more helpful error:
Thanks, @shin- ! I feel like this issue can be closed now.
shin- commentedon Nov 2, 2017
Ah, good to hear, and thank you for the follow-up!