Xhost: unable to open display ""

I successfully set up my GoPiGo2 and was able to load the Basic Robot Control script. I used both my Mac and my PC and successfully drove the robot around my house on multiple occasions across many weeks. Yesterday I turned the GoPiGo2 on and was driving it but accidentally hit “z” which exited the CLI session while the robot was still driving forwards. Ever since then I have been receiving the following error after connecting successfully via ssh.

First I tried updating the software. Then I installed the Raspbian image from SourceForge but am still unable to view the display with the letters to control the robot’s movement. I receive this same error when I login via the browser instead of the CLI. Any ideas about why I am encountering this problem and how I fix it?

Hello Emarintsch,
I’m not too sure I understand enough about your issue to be able to help in one post.

The error xhost: unable to open display "" should have been there from the start. It’s the GUI trying to find a graphical screen. It should not stop you from running your robot around.

what happens when you enter:
cd GoPiGo/Software/Python/Examples/Basic Robot Control/
sudo python basic_robot.py