pygame.error: video system not initialized

后端 未结 8 1234
情深已故
情深已故 2020-12-11 05:42

so I get this error when I try to run my pygame code: pygame.error: video system not initialized

i specify where the wing IDE tells me it is in the code below

8条回答
  •  醉话见心
    2020-12-11 06:31

    1. If you doing pygame.init() then solve the problem video system initialized. but you get the next error like:

    (AttributeError: tuple object has no attribute 'fill') this.


    1. this problem is solving when you doing this
    screen = pygame.display.set_mode((600, 400))
    

    but not doing like

    screen = screen_width, screen_height = 600, 400
    

    1. Then the full problem is solved.

提交回复
热议问题