I am using pygame's joystick api to use a joystick with my project on a headless system, but pygame requires a "screen" so I have setup a dummy video system to over come this. It worked fine but now all of a sudden it gives me this error:
Traceback (most recent call last):
File "compact.py", line 10, in <module>
screen = display.set_mode((1, 1))
pygame.error: Unable to open a console terminal
Here is what I have as the headless setup that is supposed to over come this issue.
from pygame import *
import os
import RPi.GPIO as GPIO
os.environ["SDL_VIDEODRIVER"] = "dummy"
screen = display.set_mode((1, 1))
os.environ["SDL_VIDEODRIVER"] = "dummy" pygame.display.init()
– Bostow