Pygame not working
I'm trying to run a pygame project but it isn't running at all. I've waited at least five minutes.
The console has this message and the window just says "run your repl to see output", then refreshes to a black screen and shows it again, despite the run button saying stop indicating that the program is running.
bash -c polygott-x11-vnc q && DISPLAY=:0 run-project nohup: redirecting stderr to stdout Keyboard Control: auto repeat: on key click percent: 0 LED mask: 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: 00ffffffdffffbbf fadfffefffedffff 9fffffffffffffff fff7ffffffffffff 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 Colors: default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff Font Path: /usr/share/fonts/X11/misc,/usr/share/fonts/X11/cyrillic,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins 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.6 Hello from the pygame community. https://www.pygame.org/contribute.html XOpenDisplay((null)) Must DL Open Symbol XOpenDisplay((null)) Must DL Open Symbol XOpenDisplay((null)) Must DL Open Symbol 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
this is running perfectly on my pc the problem is 1. it might be your pc is very very slow.2. You are pressing run multiple times.
Now the solutions of this problems are
- if u have a slow pc
S. The solution is to downgrade the version of the os if u are in mac pls upgrade/downgrade depends on the os u have to macos catalina and if u have windows 10/8 downgrade to windows 7 and if u are on windows 7 it might work if u upgrade to windows 10 psitively not on(Windows 8)
- The second problem was u are pressing run multiple times rather press it only one time and wait for the time it takes repl.it to process the whole code as python is a little slow language but ur code is also small zt the same time so just try it
- And I just remembered another issue sometimes due to the new update repl.it breaks sometimes
So what u can do is start using IDEs like VSCode/Pycharm
Ok theese solutions ma solve your problem.