I've been trying to get this to work for a while and this error means I have made 'progress'. I'm using Python2.7 and Pygame.
UPDATE:
I fixed this issue by changing File to sys.argv[0]
C:\Python27\dist>Space_Badgers.exe
Traceback (most recent call last):
File "Space_Badgers.py", line 16, in <module>
NameError: name '__file__' is not defined
#This is the code its referring to:
img_dir = path.join(path.dirname(__file__), "img")
Please help, I wouldn't have guessed converting to exe would be so difficult.
Though, I am still new to programming.
UPDATE:
C:\Python27\dist>Space_Badgers.exe
Traceback (most recent call last):
File "Space_Badgers.py", line 163, in <module>
pygame.error: Couldn't open img\10121.png
This is my new issue. It still runs fine in IDLE.