pygame is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

pygame / pygame http://pygame.org/

Clone this repository (size: 15.4 MB): HTTPS / SSH
hg clone https://bitbucket.org/pygame/pygame
hg clone ssh://hg@bitbucket.org/pygame/pygame

Issues

#31 pygame.error: No available video device

Reported by illume

, 2009-04-15 21:42:14 -0700

Traceback (most recent call last):
  File "C:\dpf\AssemblyLine-0.4\run_game.py", line 13, in <module>
    main.main()
  File "C:\dpf\AssemblyLine-0.4\Game\Code\main.py", line 19, in main
    display = pygame.display.set_mode(settings.screen_size, settings.flags)
pygame.error: No available video device

all pygame dependencies installed

illume, 2009-05-27 00:44:41 -0700

Hi,

looks possibly related to this bug report:
http://groups.google.com/group/pygame-mirror-on-google-groups/browse_thread/thread/423f1d7f3e909c38

Are you able to confirm which version of windows you're on?  


cu,

Pygame XP, 2011-03-25 06:38:46 -0700

(In reply to comment <<issue 1>>)
> Hi,
> looks possibly related to this bug report:
> http://groups.google.com/group/pygame-mirror-on-google-groups/browse_thread/thread/423f1d7f3e909c38
> Are you able to confirm which version of windows you're on?  
> cu,

Hi cu,

I'm having the same issue on an XP machine.  When I execute
pygame.display.init() in the shell, I receive (5,1) rather than (6,0)
and when I try to execute pygame.display.set_mode I receive
pygame.error: No available video device.

Is there a way to determine what module is failing in the init() call?

tu,

Pygame XP

Status: open Responsible: illume Type: bug Priority: trivial
Milestone: none Component: none Version: none

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 illume

    written

    import os
    os.environ['SDL_VIDEODRIVER']='windib'
    

    I think maybe we should finally switch to windib being the default even on XP. We could try some complicated scheme to try to init the display with directx first in a separate process and if that fails we try windib... but I guess that might be failure prone too.

  2. #2 illume

    written

    • Changed milestone from nothing to 1.9.2.
  3. #3 Lenard Lindstrom

    written

    The SDL Direct X driver is unreliable. 'windib' is the SDL default. How 'directx' behaves probably depends on which version of Direct X is installed. It would seem Microsoft has given up maintaining compatibility with Direct X 5.

  4. #4 Anonymous

    written

    Its a miracle! lol thanks illume for the code! I had issues getting my game working using the pygame library, and this fixed it!

  5. #5 Anonymous

    written

    i was having the same problem too, can somebody help me out, i was working for a pygame project, a lil bit explanation for me to understand it well.. plzzzzz and thanks!!

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?