pygame.error: No available video device

Issue #31 resolved
René Dudfield created an issue

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

{{{ Traceback (most recent call last): File "C:\dpf\AssemblyLine-0.4\", line 13, in <module> main.main() File "C:\dpf\AssemblyLine-0.4\Game\Code\", 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:

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 #1)

Hi, looks possibly related to this bug report: Are you able to confirm which version of windows you're on?

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?


Pygame XP }}}

Comments (11)

  1. René Dudfield reporter
    import os

    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. Lenard Lindstrom

    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.

  3. Former user Account Deleted

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

  4. Former user Account Deleted

    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!!

  5. Jason Marshall

    I think it's time to make windib the default renderer for Windows XP. With that change, we'll be able to close this issue. In my opinion, the productivity losses due to directx renderer bugs outweigh the performance advantage of the directx renderer on some hardware.

    Complicated try-directx-except-windib logic would not be a good idea because sometimes after the directx renderer fails, only a system reboot can restore the PC to proper working order.

    This is how I think the renderer-choosing logic should work:

    Windows 95/98/Me without DirectX 5 or greater → windib

    Windows 95/98/Me with DirectX 5 or greater → directx

    Windows NT/2000/XP/Vista/7/8... → windib

    I'll implement the change if @illume doesn't object to my approach.

  6. Jason Marshall
    • changed status to resolved
    • removed assignee

    I have changed pygame/_ _init_ so that windib is the default video driver for almost all Windows users.

  7. Log in to comment