Skip to content

WASM: RuntimeError: pygame.PixelArray is not available #2283

@coppermouse

Description

@coppermouse

Versions:

  • pygame-ce 2.1.4.dev1 (SDL 2.24.2, Python 3.11.2)

Background:
I am using https://github.com/pygame-web/pygbag to run a game in browser.

I got a RuntimeError: pygame.PixelArray is not available error when I try to call PixelArray().

I open a discussion on pygbag making a suggestion to make PixelArray available. I thought this was closer to pygbag than pygame-ce.

After some discussion I was told the issue was on pygame-ce / pygame wasm port

pygame-web/pygbag#103 (reply in thread)

Issue:

pygame.PixelArray does not seem to be available when in wasm port.

To replicate error message try run these two commands in the "wasm-port." ( I run them through pygbag session )

import pygame
pygame.PixelArray(pygame.Surface((1,1)))

I was given this link to test: https://pygame-web.github.io/showroom/python.html?-i
(but I think it might use based on pygame (not pygame-ce))

I of course have tested this locally with pygbag and looking at the output it seems to be using
pygame-ce 2.1.4.dev1 (SDL 2.24.2, Python 3.11.2)

Even though the pygbag-version is most likely not relevant because it out of your scope I still inform you that I use pygbag==0.7.1
`

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions