Frequently Asked Questions

General

  • Q: PyCharm cannot find my files when I import them, also unit-test do not execute.

    • Solution: Set the correct directory as Source to tell PyCharm where to import from (see here).
  • Q: When running the Deploy-Script I receive an AttributeError: 'list' object has no attribute 'read' and it crashes.

    • Solution: Check if there is a second version of subprocess installed and remove it.
pip list
...
...

# Search for "subprocess.run" in output and remove it if found
pip uninstall subprocess.run

  • 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.
  • 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.
# 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.

  • Q: I use WSL under Windows, but when running the deploy-script I still have to enter the password.
    • Solution: Install WSL 2.
      If you insist on using version 1 you have to activate extended WSL functionality in order to work with chmod/chown.
      Re-run the deploy-script with python3 deploy.py -c afterward.
# Inside WSL, execute this:
sudo vi /etc/wsl.conf
# Add the following lines to this file:
[automount]
enabled = true
options = "metadata"
# Save and close the file with "ESC", then ":" "x" "ENTER"

# Restart WSL and delete the ".bin" directory in "robolab-deploy"
cd /mnt/<DRIVE>/path/to/robolab/
rm -Rf robolab-deploy/.bin
  • Q: I want to access my files in the WSL, but I can’t find them.

    • Solution: Type \\wsl$ in the Windows “Run” dialog or Windows Explorer address bar.
  • Q: PyCharm does not show my files from the WSL.

    • Solution: Update PyCharm. Older versions do not offer support for WSL.
  • Q: I use Windows and my Python version is too old (works not for WSL).

    • Solution: Install the latest Python 3.12 (64bit).
  • Q: Virtualization is not enabled for my system (check Task-Manager)

    • Solution: Following steps will enable Virtualization support:
      Hold [Shift] and click Neu starten, select Problembehandlung -> Erweiterte Optionen -> UEFI-Firmwareeinstellungen
      Now, select Intel Virtualization Technology / SVM Mode and activate it
  • Q: I receive Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS

    • Solution: Go to Enable or Disable Windows-Features, activate VM-Platform
      Check Task-Manager if virtualization is now available (second tab, CPU, bottem-right)
  • Q: wsl --install produces Catastrophic failure

    • Solution: Try open Microsoft Store
  • Q: wsl --install produces errors, or message “Das Windows-Subsystem f├╝r Linux wurde nicht aktiviert” appears

    • Solution: From Microsoft Store, install Ubuntu
    • Solution: Go to Enable or Disable Windows-Features, activate Windows-Subsystem for Linux
      Run wsl --update afterward
  • Q: “WSL 2 erfordert ein Update der Kernelkomponente” or “WSL 2 requires an update to its kernel component”

    • Solution: Run wsl --update
  • Q: WSL has no internet connection (ping 9.9.9.9 fails)

    • Solution: Reboot your system
  • Q: WSL has internet connection, but DNS does not work (ping quad9.net fails)

    • Solution: Inside the WSL terminal, follow these steps:
sudo nano /etc/wsl.conf
# Enter following lines
[network]
generateResolvConf = false

sudo nano /etc/resolv.conf
# Enter following lines
nameserver 9.9.9.9
  • Q: Running apt-get install throws errors
    • Solution: Run apt-get update beforehand

  • Q: I use Ubuntu and my Python version is too old (works also for WSL).
    • Solution: Install a PPA for Python 3.12.
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.12 -y

  • Q: I get an ssh error when pulling, even after adding the public key to GitLab.
    • Solution: Add the private key (not ending in .pub) to your ssh-agent.
ssh-add ~/.ssh/<keyname>
  • Q: I have some other SSH problems

  • Q: I cannot connect to the MQTT broker using TLS or web-sockets due to a strange SSL verification error.

  • Q: When running the Deploy.py script, an error [SSL: CERTIFICATE_VERIFY_FAILED] pops up.

    • Solution: Run the following commands to update your Python installation:
ls /Applications/ | grep Python # to get your python installation directory ${Python}
/Applications/'${Python}'/Install\ Certificates.command # Replace ${Python} with output from first command

  • Q: When trying to connect via SSH, it asks for a password.

    • The default password is maker.
  • Q: I cannot connect to brick using USB networking.

    • Solution: Following the ev3dev instructions for setting up the network connection you’ll have to create a shared network connection. What we found for Windows 10 (8, 7 possible, but not checked) is, that, if you are using a VPN-Client and having an active VPN connection, the brick is not reachable.
      In order to connect to the brick you must disable your VPN connection because it also shares the connection with the same interface we want to use for our shared connection to the brick.
  • Q: I want to update the OS using apt-get.

    • Solution: You don’t. The brick is very limited in its resources and therefore an update/upgrade is not possible.
      Please ask the tutors if they can provide a newer and updated image.
  • Q: I need to upgrade the robolab-startup service.

    • Solution: We enabled this repository for you. Fetch the latest repository data and upgrade the package.
      Running apt-get update may exceed the Bricks memory and freeze. Please talk to your tutor before doing so.
sudo apt-get update
sudo apt-get upgrade -y robolab-startup
  • Q: During MQTT communication with the server, I receive a NoneType error caused by an unexpected message the server shouldn’t have sent.

    • Solution: Make sure to start the communication loop only once after connecting with your credentials and not at each node reached.
      Several starts and stops of the loop can cause the robot to misinterpret messages sent by the server (or in other words, it is too slow).
    • Might be resolved when switching to RaspberryPi+ModBrick in the future.
  • Q: After joining the tmux session I cannot enter any character, it is unresponsive.

    • Solution: For some reason your local shell sent some overwrite commands to the brick as well resetting some of the essential TMUX parameters.
      Connect to the brick using SSH and execute the following command:
stty -F /dev/pts/0 4500:5:bf:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0

  • Q: For Git, I don’t use SSH but HTTPs with credentials, but I don’t want to enter them every time.
    • Solution: Use SSH. ­čĄô
      You can tell Git to store the credentials for a certain time. The following command sets the timeout to 1 hour.
git config --global credential.helper 'cache --timeout 3600'

Wi-Fi “RoboLab Playground”

For the spring course, we provide a separate wireless network (IP range: 172.30.0.0/16) called RoboLab Playground.
The Bricks should auto-connect to it. If not, please use the following WPA2 Key:

  • someobviouspass

Please note, that you cannot reach any device inside the RoboLab Playground Wi-Fi from the outside, e.g. while connected to eduroam or VPN/WEB.