Wireframe-Magazine / Wireframe-21

Projects and assets from Wireframe #21
Other
5 stars 3 forks source link

NameError: name 'Actor' is not defined #2

Open nils-werner opened 5 years ago

nils-werner commented 5 years ago

When running supersprint.py, I get the following traceback

(speed) [me@mac Wireframe-21 (master)]$ python supersprint.py 
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Traceback (most recent call last):
  File "supersprint.py", line 8, in <module>
    cars.append(Actor('car'+str(c), center=(400, 70+(30*c))))
NameError: name 'Actor' is not defined

After installing pgzero I have the following libraries installed:

Package    Version
---------- -------
numpy      1.17.1 
pgzero     1.2    
pip        19.2.3 
pygame     1.9.6  
setuptools 41.2.0 
wheel      0.33.6 
Angorange commented 5 years ago

I stumbled on the same issue, to solved it, I had to run the program from command line, using: pgzrun supersprint.py