E
E
Emil Sagatdinov2017-01-18 22:25:16
Python
Emil Sagatdinov, 2017-01-18 22:25:16

What should I do to make the error disappear?

Hello, I decided to try to make a game, I ran into errors, please help.
The code:

import pygame
from pygame import *
WIN_WIDTH = 800
WIN_HEIGHT = 640
DISPLAY = (WIN_WIDTH, WIN_HEIGHT)
BACKGROUND_COLOR = "#004400"
def main():
    pygame.init()
    screen = pygame.display.set_mode(DISPLAY)
    pygame.display.set_caption("Game")
    bg = pygame.Surface(WIN_WIDTH, WIN_HEIGHT)
    bg.fill(pygame.Color(BACKGROUND_COLOR))
    while 1:
        for e in pygame.event.get():
            if e.type in "QUIT":
                raise SystemExit("QUIT")
        screen.blit(bg,(0,0))
        pygame.display.update()
if __name__ == "__main__":
    main()

Errors:
C:\Python32\python.exe D:/Emil/Python/Game/Base.py
Traceback (most recent call last):
File "D:/Emil/Python/Game/Base.py", line 1, in
import pygame
File "C:\Python32\lib\site-packages\pygame\__init__.py", line 95, in
from pygame.base import *
ImportError: DLL load failed: %1 is not a Win32 application.
Process finished with exit code 1

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeniy _, 2017-01-18
@GeneD88

You have written everything in error. Match your OS and python \ pygame (I'm talking about bitness)

Y
Yuri, 2017-01-19
Lubyanoy @Dreif

import pygame
from pygame import *
Maybe this is the reason, the same thing twice

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question