pygame error: couldn't open the ship.bmp

在pygame里练习一个游戏程序,遇到“pygame error: couldn't open the ship.bmp”在网上查了下错误的原因,主要是说要补全路径或把bmp图片放在.py文件相同的目录下,我各种方式都试了,但还是报错...
以下是代码:

import sys

import pygame

from settings import Settings
from ship import Ship

def run_game():
#initialize game and create a window obj
pygame.init()
ai_settings = Settings()
screen = pygame.display.set_mode(
(ai_settings.screen_width,ai_settings.screen_height))
pygame.display.set_caption("Alien Invasion")

#creat a ship
ship = Ship(screen)


#begin main cycle of game

while True:

    #monitor key and shubiao
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            sys.exit()
        #draw a new screen while a new cycle begin
        screen.fill(ai_settings.bg_color)
        ship.blitme()

        #show the near screen
        pygame.display.flip()

run_game()

模块ship.py

import pygame

class Ship():

def __init__(self,screen):
    """initialize ship and set location of ship"""
    self.screen = screen

    #load image of ship and get the bounding box of the ship
    self.image = pygame.image.load(r'images\ship.bmp')
    self.rect = self.image.get_rect()
    self.screen_rect = screen.get_rect()

    #place each ship into center of bottom of screen
    self.rect.centerx = self.screen_rect.centerx
    self.rect.bottom = self.screen_rect.bottom
def blitme(self):
    """drawing the ship in the specific place"""
    self.screen.blit(self.image,self.rect)

你要把图片放到 py源码目录下的 images 文件夹内,
并且保证 ship.bmp 的一个有效的,能浏览的图片文件。

补全路径,并在路径前加 r 读取文件

具体形式如下,*号表示你的路径

 self.image = pygame.image.load(r'*********\*****\***\images\ship.bmp')

谢谢楼上,问题已解决