Python 错误:无法打开映像
我正在pygame中开发一个基于时间的运动程序。我一直收到这个错误Python 错误:无法打开映像,python,image,jpeg,pygame,Python,Image,Jpeg,Pygame,我正在pygame中开发一个基于时间的运动程序。我一直收到这个错误 Traceback (most recent call last): File "C:\Documents and Settings\Mohammad Raza\Desktop\Python Scripts\TimeBasedMovement.py", line 11, in <module> background = pygame.image.load(background_image_fil
Traceback (most recent call last):
File "C:\Documents and Settings\Mohammad Raza\Desktop\Python
Scripts\TimeBasedMovement.py", line 11, in <module>
background = pygame.image.load(background_image_filename).convert()
error: Couldn't open Wolf.jpg
还要确保映像位于当前工作目录中
fullname = os.path.join('data', name)
image = pygame.image.load(fullname)
也应该是
time_passed_seconds = time_passed / 1000.
没错,但这不是OP要问的问题。指出OPs代码中的其他错误可能会很有帮助,但这些帮助应该在注释中提供,因为它们实际上并没有回答所问的问题。
time_passed_seconds = time_passed / 1000.