techwithtim/Python-Platformer

Loading file error

Closed this issue · 0 comments

Hello guys,

i get this error when trying to starting the tutorial.py:

pygame 2.5.2 (SDL 2.28.3, Python 3.12.2)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "D:\User\Desktop\Python-Platformer-main\tutorial.py", line 56, in
class Player(pygame.sprite.Sprite):
File "D:\User\Desktop\Python-Platformer-main\tutorial.py", line 59, in Player
SPRITES = load_sprite_sheets("MainCharacters", "MaskDude", 32, 32, True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\User\Desktop\Python-Platformer-main\tutorial.py", line 24, in load_sprite_sheets
images = [f for f in listdir(path) if isfile(join(path, f))]
^^^^^^^^^^^^^