-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
az acr build : UnicodeEncodeError: 'charmap' codec can't encode characters in position 57-96 #22301
Comments
route to CXP team |
@williamhbell Thanks for reaching out to us and sharing this feedback. I am sharing a few action plan. Please implement it and share the outcome. Plan 1: Could you please try
Firstly you need to ensure that the reference: #19042 Hope this helps. |
Using
With the
The output successfully completes. Retrieving the log from the previous command fails as expected:
|
@williamhbell Thanks for sharing the outcome of Plan 1 and Plan 2. May I know if you have tried the plan 3 mentioned in my above command ? Could you please update me the status once you get a chance ? Awaiting you reply. |
Using the Dockerfile
The az acr build fails as before:
|
@williamhbell Apologies for the late reply. I think it's a platform issue related to the unique combination Windows + GitBash (MSYS2) + Python. Could you please try to update the Windows system language setting ? Control panel -> Clock and Region -> Region -> Administrative -> Change system locale -> Check Beta: Use Unicode UTF-8 for worldwide language support The change will require reboot. Also I would suggest you to switch to Windows Terminal for better support. Hope this helps. |
@williamhbell I wanted to do quick follow-up to check if you had a chance to look at my above comment. Please let us know if you need any further assistance on this. Awaiting your reply. |
@williamhbell The action is currently pending on you to test the above action plan. We will now proceed with closure of this github issue. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help. |
Unfortunately, we can see the same issue with our Azure Pipeline |
@AndreyBespamyatnov If you are seeing the same issue with Windows image in Azure Devops Pipeline then the same above plan can be done by implementing this via registry key using PS. You can run the below PS script for that:
More Info here. Hope this helps. |
Describe the bug
When an
az acr build
is run on Windows 10 using Git Bash and pip, it appears that the pip package install progress characters crash the log from the build. The build succeeds and the image is created in the container registry, even though the build is reported to have failed. The failure appears to be only associated with the log stream.If the same command is run using a command prompt and
az acr build
it succeeds. If the command is used with Git Bash and Docker desktop, it also succeeds.Command Name
az acr build
Errors:
To Reproduce:
Steps to reproduce the behaviour. Note that argument values have been redacted, as they may contain sensitive information.
The present working directory should contain
Dockerfile
,app.py
,requirements.txt
.app.py
requirements.txt
az acr build --resource-group {} --registry {} --image {} {}
The
az acr build
from Git Bash with and the Dockerfile:crashes.
However, the
az acr build
from Git Bash and the Dockerfile:succeeds.
Expected Behaviour
I expect that the build log should not crash when the build is run from Git Bash.
Environment Summary
Additional Context
The text was updated successfully, but these errors were encountered: