pygame-web / pygbag

python and pygame wasm for everyone ( packager + test server + simulator )
https://github.com/pygame-web
MIT License
295 stars 34 forks source link

pygame.error: Surface doesn't have a colorkey #153

Open ragej4x opened 5 months ago

ragej4x commented 5 months ago

pygame mixer init frequency=44100, size=-16, channels=2, buffer=2048 Task exception was never retrieved future: <Task finished name='main_loop' coro=<main_loop() done, defined at :9> exception=error("Surface doesn't have a colorkey")> Traceback (most recent call last): File "", line 360, in main_loop File "", line 109, in init pygame.error: Surface doesn't have a colorkey

pmp-p commented 5 months ago

Please share complete project if you cannot explain what you are trying to do, because this is not a proper bug report.

i can only guess you forgot numpy at top of main.py and the PEP block

# /// script
# dependencies = [
#    "numpy",
#    "pygame-ce",
# ]
# ///

import numpy
import asyncio
import pygame