本帖最后由 宋宋 于 2017-12-24 22:07 编辑
剑心无痕 发表于 2017-12-22 08:38
打不开图片,你把图片的路径写全试试,/users/xxxx/Desktop/image/ship.bmp @剑心无痕 我把路径改为了#/Users/Desktop/Python_work/image/ship.bmp。但还是报错: Traceback (most recent call last): File "alien_invasion绘制飞船.py", line 38, in <module> run_game() File "alien_invasion绘制飞船.py", line 18, in run_game ship=Ship(screen) File "/Users/apple/Desktop/Python_work/ship.py", line 10, in __init__ self.image=pygame.image.load('/Users/apple/Desktop/Python_work/images/ship.bmp') pygame.error: Couldn't open /Users/apple/Desktop/Python_work/images/ship.bmp
|