FAQ

Creating Server TCP listening socket *:6379: bind: Address already in use

Find the PID of the running redis server and kill it.

Could not connect to YourComponentNameHere on device 192.168.0.xxx:

This could have many different causes, but there are a few things to check.

  1. Check the IP address of the robot is correct. Press the chest button to find out.

  2. Make sure the component is running, if it is not a desktop or robot component. E.g. Dialogflow and Whisper have to be started separately.

  3. You are using the desktop or robot components directly. Use the Nao(ip=...)/Pepper(ip=...)/Desktop() wrappers which will start the components for you.

RuntimeError: Wrong path format

Error: RuntimeError: Wrong path format (animations/Stand/BodyTalk/BodyTalk_1) which has been converted in: animations/Stand/BodyTalk/BodyTalk_1, it should follow the pattern: package/path

Solution: BodyTalk/BodyTalk_XX does not work on the NAO’s as of 16/11/2023. The Gestures do work, so try those instead (possible to record your own).

Cannot show the camera output [Mac]

Solution A: run in own terminal or VS code, not in pycharm terminal

Solution B: Check that your OpenCV install is working (How can one display an image using cv2 in Python On MacOS you can only use cv2.imshow from the main thread, not from other threads or callbacks (which use threads).

Webcam doesn't turn on but on the iphone it does [Mac]

On mac can turn off "Continuity Camera" or 

On your iPhone, go to Settings > General > AirPlay & Handoff. Turn off Continuity Camera

Pyaudio install problem: fatal error: 'portaudio.h' file not found [All OS]

On Mac
brew install portaudio pip install pyaudio pip install opencv-python six
On Ubuntu
sudo apt-get install portaudio19-dev python3-pyaudio pip install pyaudio pip install opencv-python six

 

ImportError: libGL.so.1: cannot open shared object file: No such file or directory [WSL]

sudo apt-get install python3-opencv

 

Incompatible architecture [Mac]

error: have ‘arm64’, need ‘x86_64’, this seems to affect the newer macbooks only. I was told that the student fix it my trying different answers of this stackoverflow question:

mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64') in Flutter

 

Very laggy camera output [All OS]

Make sure libturbo-jpeg is installed.

Image is tinted blue [Python]

if using openCV, try adding this line of code:

img= cv2.cvtColor(img, cv2.COLOR_RGB2BGR)

Python Opencv output.avi screengrab color is blue intensive

Webcam output is flipped [Python]

flip the image by vertically by adding this line ofcode

img= cv2.flip(img, 0)

Module google not found [Python]

pip install google-cloud-dialogflow

How can I do two things at the same time in my python program?

Use the block=False parameter of the nao.request method to not wait for things to complete. If you do need to wait for the result, but still want to do multiple things: use threads!

face_detection_dnn.py: ERROR: invalid load key, 'v':

Use python 3.9

gRPC error: No DesignTimeAgent found:

You probably are not using the right keys and/or have not created an agent on the dialogflow site. Check the instructions TODO here.

Issue with dialogflow not properly transcribing after subsequent calls:
Try restarting the dialogflow component. E.g. restart dialogflow.py

Unauthenticated: 401 Request had invalid authentication credentials ACCESS_TOKEN_EXPIRED: [dialogflow]

If you see:

google.api_core.exceptions.Unauthenticated: 401 Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project. [reason: "ACCESS_TOKEN_EXPIRED"

Make sure your machine's clock is synced.

How to change the speed a recorded motion?

Use

Can I use NaoQi without/parallel to SIC?

In theory, yes. However, usually it is quite a hassle to install and run yourself so this is not recommended(either on Mac or Windows) as it usually takes a significant amount of time.

Naoqi SDK installation instructions (if you are using NAO or Pepper directly in Python) http://doc.aldebaran.com/2-5/index_dev_guide.html
https://www.aldebaran.com/en/support/nao-6/downloads-softwares
This is the official library for Pepper/Nao robots. One thing you might want to pay particular attention to is the installation of it .
To download PythonSDK, follow here:
Make sure you have python 2.7 (eg. run “python -V” in the terminal)
Download Python SDK from https://www.aldebaran.com/en/support/nao-6/downloads-softwares
Tips for installing Naoqi on Mac (and similar on Linux):
After downloading python sdk of naoqi, open the terminal and type in:
$ open ~/.zshrc
Next, add the following lines into your zsh file:

Save the changes to zsh file and restart a new terminal. Enter python 2.7 in the terminal and try to import naoqi. If you succeed to import it without any error complaints, then you are good to go.

Issues with naoqi:

Install python 2.7 from website below:

https://www.python.org/downloads/release/python-2710/

if you use conda, type ‘conda deactivate’ in terminal

If your MacOS blocks installing the sdk from an unidentified developer, check the Mac user guide here to override your security settings. The python version should be 2.7 now

How to terminate processes in Windows command prompt if Ctrl + C can't kill them?

If you are using a Dell laptop, try CTRL+Fn+B

 

Failed to build opencv-python ERROR: Could not build wheels for opencv-python:

Try installing an earlier version of OpenCV might work: pip install opencv-python==4.8.1.78

 

Could not connect to redis at 10.0.0.X

If you have a problem connecting to the Redis server, even after running it in another terminal, it could be that your firewall is blocking communication from the robot. Please turn off your firewall to allow the robot to connect to the Redis server.