Ask coding questions

← Back to all posts
pygame wont output to the virtual screen
Ill_be_back_inb (5)

whenever i try to run a program that uses pygame to display visuals, i get an error message, i have looked around forums for a while but havnt found aything related to this issue and REPl.
the error:

xset:  unable to open display ":0"
xset:  unable to open display ":0"
Keyboard Control:
  auto repeat:  on    key click percent:  0    LEDmask:  00000000
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    off 02: Scroll Lock: off
    03: Shift Lock:  off    04: Group 2:     off 05: Mouse Keys:  off
  auto repeat delay:  660    repeat rate:  25
  auto repeating keys:  00feffffdffffbbf
  bell percent:  50    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  2/1    threshold:  4
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  600    cycle:  600
  default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
DPMS (Energy Star):
  Display is not capable of DPMS
nohup: ignoring input and appending output to 'nohup.out'
nohup: appending output to 'nohup.out'
pygame 1.9.5
Hello from the pygame community.
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
Answered by ArchieMaclean (688) [earned 5 cycles]
View Answer
ArchieMaclean (688)

Those errors are standard. They happen to all pygame repls. Was there any actual error apart from that?

btw you have to use backticks (`) for code (markdown).

Please upvote if this helps :)

Ill_be_back_inb (5)

this happens whenever I run any programs that use a pygame interface.

ArchieMaclean (688)

@Ill_be_back_inb Yes, they happen to me too - they don't actually mean any errors happening.

Ill_be_back_inb (5)

@ArchieMaclean but the visuals for the game don't appear?
I play games made using pygame that people have said work on repl but they don't no visuals just that so I'm confused.

ArchieMaclean (688)

@Ill_be_back_inb ok, that is an issue (not related to the error messages)

Do you have a link to the repl?

SangeetS (1)

Here is the link to my code:
The misbehaving code is under
As y'all said before, the "Display is not capable of DPMS" error doesn't mean anything, but for some reason, it doesn't work. It is supposed to create an applet that only names itself 'All Me,' but the output is just the console saying, 'Hello World' and the DPMS error. Please HEELP!!!

btw: this is in java

SangeetS (1)

@SangeetS nvm figured it out
I wasn't running it from