Exception Occurred While Loading Image. SOLVED

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
Blantech
Newbie
Posts: 5
Joined: Tue Jun 12, 2018 4:22 am
Contact:

Exception Occurred While Loading Image. SOLVED

#1 Post by Blantech » Wed Jun 13, 2018 2:23 am

So I got my first one going and well I felt pretty good about it but noticed I was stashing every thing in the game folder it was just so ugly, so I made an images folder to stash it all in then I made subfolders to organize it. Well it broke everything even the title menu stuff, which i moved to the gui folder like another perosns game I had laying around did, I poked around his code with his permision was just a tech demo for his latest project he put out. So I did what he did, bamn now I got my title menu stuff going again ok good. So I then start work on using my new png assets for a test run I done dialogue with out images, and even did some fiddling around made a naming event for the player charactor. I was feeling pretty confident then I added in a scene to laod a background image and bamn, I am a newb again..




Code: Select all

I'm sorry, but an uncaught exception occurred.

While loading <'Image' u'images\x08ackground\room1.png'>:
  File "game/script.rpy", line 59, in script
    z "You decided to test this, well here we go!"
IOError: Couldn't find file 'imagesackground
oom1.png'.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 59, in script
    z "You decided to test this, well here we go!"
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\ast.py", line 652, in execute
    renpy.exports.say(who, what, interact=self.interact, *args, **kwargs)
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\exports.py", line 1199, in say
    who(what, *args, **kwargs)
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\character.py", line 1016, in __call__
    self.do_display(who, what, cb_args=self.cb_args, **display_args)
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\character.py", line 817, in do_display
    **display_args)
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\character.py", line 566, in display_say
    rv = renpy.ui.interact(mouse='say', type=type, roll_forward=roll_forward)
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\ui.py", line 287, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\display\core.py", line 2649, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\display\core.py", line 3132, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\display\core.py", line 2055, in draw_screen
    renpy.config.screen_height,
  File "render.pyx", line 485, in renpy.display.render.render_screen
  File "render.pyx", line 233, in renpy.display.render.render
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\display\layout.py", line 717, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 145, in renpy.display.render.render
  File "render.pyx", line 233, in renpy.display.render.render
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\display\layout.py", line 717, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 145, in renpy.display.render.render
  File "render.pyx", line 233, in renpy.display.render.render
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\display\layout.py", line 717, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 145, in renpy.display.render.render
  File "render.pyx", line 233, in renpy.display.render.render
  File "accelerator.pyx", line 108, in renpy.display.accelerator.transform_render
  File "render.pyx", line 233, in renpy.display.render.render
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\display\image.py", line 495, in render
    return wrap_render(self.target, width, height, st, at)
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\display\image.py", line 306, in wrap_render
    rend = render(child, w, h, st, at)
  File "render.pyx", line 145, in renpy.display.render.render
  File "render.pyx", line 233, in renpy.display.render.render
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\display\im.py", line 580, in render
    return cache.get(self, render=True)
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\display\im.py", line 266, in get
    surf = image.load()
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\display\im.py", line 625, in load
    surf = renpy.display.pgrender.load_image(renpy.loader.load(self.filename), self.filename)
  File "C:\Renpy Projects\renpy-7.0.0-sdk\renpy\loader.py", line 555, in load
    raise IOError("Couldn't find file '%s'." % name)
IOError: Couldn't find file 'imagesackground
oom1.png'.

Windows-8-6.2.9200
Ren'Py 7.0.0.196
The Substitute .01
Tue Jun 12 23:12:52 2018
The code I got for the intro is:

Code: Select all

scene proom with fade

    z "You decided to test this, well here we go!"

    "What is your name?"

    # The phrase in the brackets is the text that the game will display to prompt
    # the player to enter the name they've chosen.

    $ player_name = renpy.input("What is your given name?") or "Me" #check for no input in name is done here
    $ player_name = player_name.strip() # it may interfere with the splitting code if it strips space chars mid-string, need to check on that. If it's a problem use .rstrip() instead.

    python:
        if player_name == "":
            player_name="Me" # If the player can't be bothered to choose a name, then we choose a suitable one for them:
    # Now the other characters in the game can greet the player.
    "Let's begin the adventure [player_name]!"

    # This ends the game.
    
I made a stash of all my image file set ups before label start before the character definitions

Code: Select all

#Eileen
image enormal = "images\eileen_sprites\eileenstatic1.png"
image eunhappy = "images\eileen_sprites\eileenothappy.png"

#Ashley
image anormal = "images\ashley_sprites\ashley\ashleystatic1.png"
image ajoy = "images\ashley_sprites\ashleyjoy1.png"

#Jess
image jnormal = "images\jess_sprites\jessstatic1.png"
image junhappy = "images\jess_sprites\jessunhappy1.png"



#backgrounds
image ent = "images\background\sentrance1.png"
image 1stf = "images\backgrounds\1stfloorh1.png"
image proom = "images\background\room1.png"

define e = Character("Eileen")
define a = Character("Ashley")
define z = Character("Zalzany")
define j = Character("Jess")
Last edited by Blantech on Thu Jun 14, 2018 10:05 pm, edited 1 time in total.

Blantech
Newbie
Posts: 5
Joined: Tue Jun 12, 2018 4:22 am
Contact:

Re: Exception Occured While Loading Image.

#2 Post by Blantech » Wed Jun 13, 2018 2:28 am

Alright no idea why it didn't like \ but / and renaming the folder bg fixed it. Is \ and / the key factor? it seems to be misreading the names i do have language packs installed on my windows to play Japanese games but I typed it in English...

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

Re: Exception Occured While Loading Image.

#3 Post by xavimat » Wed Jun 13, 2018 4:51 am

Do not use \ in renpy. Use always / in fact, \b is used for backspace and \r is used for "carriage return" as \n is used for newline (see https://stackoverflow.com/questions/679 ... d-behavior and https://docs.python.org/2.0/ref/strings.html )

Also, avoid using names starting with numbers ("1stf"), start all your variable_names with letters or undescores (but better only letters)
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)

Post Reply

Who is online

Users browsing this forum: No registered users