Windows & GitBash-related
- Q: I use VSCode and my unit-tests are not executing but crashing with import errors.
- Solution: VSCode has some issues with project structure, so we need the following command to execute tests in a terminal.
python3 -m unittest tests.test_planet
- Q: I use GitBash, and it says “/usr/bin/env python3 not found”.
- Solution: Add an alias to your local python installation to GitBash and start the script with the alias.
vi ~/.bashrc
# Hit "i" and add the next lines (check before if py.exe or python.exe):
alias python='winpty python.exe'
alias python3='winpty python.exe'
# Hit "ESC", then ":" "x" "ENTER"
source ~/.bashrc
python3 deploy.py
Q: When executing the Deploy-Script it gets stuck on ssh commands and creates a file
ssh.exe.stackdump
.- Solution: Re-run
python3 deploy.py -c
to force correct file permissions.
- Solution: Re-run
Q: GitBash does not use my SSH-keys to connect to the brick or Gitlab. [DEPRECATED]
- Solution: Make sure to have the
ssh-agent
running every time GitBash starts.
This works also for WSL 1.
- Solution: Make sure to have the
# Open this file in Gitbash
vi ~/.profile
# New lines to add
eval `ssh-agent.exe`
ssh-add ~/.ssh/*
# Restart Gitbash
- Q: Running the Deploy-Script results in “subprocess not found” or a similar error.
- Solution: Uninstall Python 32bit (which is lacking the subprocess module) and install the 64bit version.