'Image not found' but it's there!!! What the hell??

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
gamajorbatistan
Regular
Posts: 35
Joined: Sun Mar 04, 2018 3:57 am
Contact:

'Image not found' but it's there!!! What the hell??

#1 Post by gamajorbatistan »

Why do these weird errors keep happening ? I'm so lost with RenPy, it's like it's making fun of me and bullshitting just to piss me off.

So for absolutely no apparent reason, I'm now getting an red-text 'Image not found' upon running some lip sync. But the image is there!!! The exact same code works a little bit earlier (with different images, but in principle it's the same code). I've checked for typos a million times, unless I have some sort of brain damage I'm unaware of, there are no typos. This doesn't make any sense.

Jesus christ give me strenght to persevere on this journey because RenPy is really starting to make me want to throw my computer out the window.

This is where I define the lip sync

Code: Select all

    image Elsa_blinking lip sync:
        "char/else/eyes_0001.png"
        pause renpy.random.randint(2,4)
        "char/else/eyes_0002.png"
        pause 0.2
        repeat
And where I call it (not too exciting?)

Code: Select all

   show Elsa_blinking at center
I get a red text claiming 'Image Elsa_blinking not found'

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: 'Image not found' but it's there!!! What the hell??

#2 Post by xavimat »

Mmmm. The code seems correct (although you have too much indent in the image definition. Why do you have that? It's maybe inside a block of something?).
Where are your images? In the game/char directory or in the game/images/char directory?
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

gamajorbatistan
Regular
Posts: 35
Joined: Sun Mar 04, 2018 3:57 am
Contact:

Re: 'Image not found' but it's there!!! What the hell??

#3 Post by gamajorbatistan »

xavimat wrote: Thu Jun 28, 2018 3:13 pm Mmmm. The code seems correct (although you have too much indent in the image definition. Why do you have that? It's maybe inside a block of something?).
Where are your images? In the game/char directory or in the game/images/char directory?
Yes, it's inside my init block. This is so strange and frustrating, even when i change the code to a lip sync that i used just a few lines earlier, it claims it can't find the image. When I change the name to ABC, it claims it can't find it. Have I broken the RenPy logic matrix? With this simple of a project already?

The images are in 'gametitle/game/images/char/...' but I successfully reference and assign them earlier in the game. It's as if once you hit 600 lines of code it throws its hands up and goes 'nope, not doing this any longer, sorry!'.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: 'Image not found' but it's there!!! What the hell??

#4 Post by xavimat »

If your images are in "images/char..." then you are referring them wrong. Try:

Code: Select all

image Elsa_blinking lip sync:
    "images/char/else/eyes_0001.png"
    pause renpy.random.randint(2,4)
    "images/char/else/eyes_0002.png"
    pause 0.2
    repeat
No need to put image definitions in an init block. Renpy knows that every image definition will be read at init time.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

gamajorbatistan
Regular
Posts: 35
Joined: Sun Mar 04, 2018 3:57 am
Contact:

Re: 'Image not found' but it's there!!! What the hell??

#5 Post by gamajorbatistan »

xavimat wrote: Thu Jun 28, 2018 6:59 pm If your images are in "images/char..." then you are referring them wrong. Try:

Code: Select all

image Elsa_blinking lip sync:
    "images/char/else/eyes_0001.png"
    pause renpy.random.randint(2,4)
    "images/char/else/eyes_0002.png"
    pause 0.2
    repeat
No need to put image definitions in an init block. Renpy knows that every image definition will be read at init time.
but it's all working for basically the exact same code earlier ;o( ?? this is so confusing

EveningDove
Newbie
Posts: 5
Joined: Thu Jun 07, 2018 2:20 pm
Contact:

Re: 'Image not found' but it's there!!! What the hell??

#6 Post by EveningDove »

Are you sure you spelled the folder name correctly? Your character's name is Elsa (with an a) but you're looking in a folder named else (with an e)

dramaticaluniweeb
Newbie
Posts: 15
Joined: Sun Jun 12, 2016 1:28 am
Contact:

Re: 'Image not found' but it's there!!! What the hell??

#7 Post by dramaticaluniweeb »

I'm having this exact problem! I have two character sprites, both in the EXACT same folder, BOTH defined correctly, and BOTH within the images folder. Literally nothing is different about the two except their names, but for some reason, when I try to show one, renpy claims that the image doesn't exist. I copy-pasted the file name and everything, so what gives???

EDIT: Okay, this is what happened on MY computer. It's a PC running Windows 10, and it might be a local issue, but check just in case. This was driving me nuts for HOURS.

I went back and double-checked my files, and I noticed that for some reason, windows was AUTOMATICALLY putting a space before the sprite I intended to call, whereas I was trying to call the file name without the space. It didn't do this for any of my other sprite files, which is why they got called normally. When I tried to remove the space, it gave me a message that stated that because the file names were the same, it wouldn't change the file, which means that it wouldn't remove the space. I had to remove the space ALONG with a few other letters, and update the new name in renpy. Although it sounds tedious, doing this ACTUALLY made it work! The sprite now shows up and functions as it should.

Here's my advice: Before trying to call any images, go back into the files and MAKE SURE that they don't have that space at the beginning. In fact, remove every space in the file name by going to the beginning of each word in the file name and hitting Backspace. If you see the text move, that means there was a space there. Replace the spaces where you want them to be, and change the file name slightly so that it saves your changes. Then, if you don't want to update everything in your script, go back and change the file name to what you originally wanted it to be. Or, if you want to avoid all that, do a full copy and paste into renpy and do NOT change the file name AT ALL.

Post Reply

Who is online

Users browsing this forum: piinkpuddiin, Rhapsy