Skip to content

Running from script does not work #359

@Mambouna

Description

@Mambouna

The documentations states that pgzero can be used with for example IDLE by using import pgzrun and pgzrun.go() at the start and end of the script. This doesn't seem to work however, as creating an actor results in the following error being thrown when trying to run it:

pygame.error: No video mode has been set

A minimal example for reproduction would be:

import pgzrun

apple = Actor("apple")

def draw():
    screen.clear()
    apple.draw()

pgzrun.go()

I'll check for reasons and maybe open a PR tomorrow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions