Ask coding questions

← Back to all posts
Loading and Image
MrBall (0)

Hello,

I am trying to add an image into pygame, but it keeps on saying that there is a filename error. I have the image in my repl files, so not sure what is going on. I have images of the code and error message. New to posting for help, so please lmk if you need any other info

Comments
hotnewtop
19ecal (228)

You're telling it that the image is under the images folder, which doesn't actually exist, the image is actually in the same directory as the python file, so just do pygame.image.load("ship.bmp")

IntellectualGuy (676)

Can you link the repl, that would help

MrBall (0)

I think you actually just answered my other question, but I can't fork or send it out of my team. Here's a student link if you would like to try that - https://repl.it/team/MoreyMS/Aliens-v2. I appreciate your help! @IntellectualGuy

IntellectualGuy (676)

@MrBall Do you mind sending me the invite again, I don't know why but It's not letting me join.

MrBall (0)

@IntellectualGuy I think it's due to it being my school team that I had all my students join. I think the only thing would be that I have to add you, and while you've been helpful, I'd rather not as it's a school thing. I appreciate your willingness to help - wish I could give you more info.