As a beginner I wrote a simple code to draw some shapes on the screen. When I runned it I got a Fatal Python error (pygame parachute) Segmentation Fault.
I could isolate the problem to calling a pixelArray of one pixel. When I run this simplified code I get a File ..., line 9, in <module> pixArray[480][380] = BLACK builtins.ValueError: sequence size mismatch
I could isolate the problem to calling a pixelArray of one pixel. When I run this simplified code I get a File ..., line 9, in <module> pixArray[480][380] = BLACK builtins.ValueError: sequence size mismatch
import pygame, sys from pygame.locals import * pygame.init() BLACK=[0,0,0] WHITE=[255,255,255] windowSurface = pygame.display.set_mode((500,400),0,32) windowSurface.fill(WHITE) pixArray = pygame.PixelArray(windowSurface) pixArray[480][380] = BLACK del pixArray pygame.display.update() while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit()What does this mean? What is going wrong?