This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- job: precommit | |
pool: | |
vmImage: ubuntu-latest | |
variables: | |
PYTHON_VERSION: 3.11 | |
VENV_ENV_NAME: .venv | |
PRE_COMMIT_HOME: $(Pipeline.Workspace)/pre-commit-cache | |
steps: | |
- task: UsePythonVersion@0 |
Running Python scripts in CI pipelines on Windows agents can sometimes cause UnicodeEncodeErrors that don't seem to make any sense. For example, running a simple command with a tool built in click or running dbx build or prefect build may run fine on your local Windows machine, but fail when running in a CI pipeline.
For example, running the below code:
# example.py
import click