Ren'Py Problem start testing my VN

Mescalino

Active Member
Aug 20, 2017
937
6,633
Not sure what i have done or how to fix it.
Deos anyone have a clue or a direction i should go. Thanks

Python:
I'm sorry, but an uncaught exception occurred.

While running game code:
Exception: DynamicImage [u'gui/button/navigation_[prefix_]background.png', u'gui/button/[prefix_]background.png']: could not find image. (u'gui/button/navigation_idle_background.png', u'gui/button/navigation_background.png', and 2 more.)

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

Full traceback:
  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script
    python hide:
  File "H:\renpy-7.3.5-sdk\renpy\ast.py", line 914, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "H:\renpy-7.3.5-sdk\renpy\python.py", line 2028, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in <module>
    python hide:
  File "renpy/common/_layout/screen_main_menu.rpym", line 35, in _execute_python_hide
    ui.interact()
  File "H:\renpy-7.3.5-sdk\renpy\ui.py", line 297, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "H:\renpy-7.3.5-sdk\renpy\display\core.py", line 2702, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "H:\renpy-7.3.5-sdk\renpy\display\core.py", line 3194, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "H:\renpy-7.3.5-sdk\renpy\display\core.py", line 2094, in draw_screen
    renpy.config.screen_height,
  File "renpy/display/render.pyx", line 490, in renpy.display.render.render_screen (gen\renpy.display.render.c:6805)
    rv = render(root, width, height, st, st)
  File "renpy/display/render.pyx", line 259, in renpy.display.render.render (gen\renpy.display.render.c:3520)
    rv = d.render(widtho, heighto, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:4075)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 259, in renpy.display.render.render (gen\renpy.display.render.c:3520)
    rv = d.render(widtho, heighto, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:4075)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 259, in renpy.display.render.render (gen\renpy.display.render.c:3520)
    rv = d.render(widtho, heighto, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:4075)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 259, in renpy.display.render.render (gen\renpy.display.render.c:3520)
    rv = d.render(widtho, heighto, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\screen.py", line 675, in render
    child = renpy.display.render.render(self.child, w, h, st, at)
  File "renpy/display/render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:4075)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 259, in renpy.display.render.render (gen\renpy.display.render.c:3520)
    rv = d.render(widtho, heighto, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:4075)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 259, in renpy.display.render.render (gen\renpy.display.render.c:3520)
    rv = d.render(widtho, heighto, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\layout.py", line 925, in render
    surf = render(d, width - x, rh, cst, cat)
  File "renpy/display/render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:4075)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 259, in renpy.display.render.render (gen\renpy.display.render.c:3520)
    rv = d.render(widtho, heighto, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\behavior.py", line 774, in render
    rv = super(Button, self).render(width, height, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\layout.py", line 1097, in render
    xminimum = max(xminimum, size_groups[size_group].width(width, height, st, at))
  File "H:\renpy-7.3.5-sdk\renpy\display\layout.py", line 1041, in width
    rend = renpy.display.render.render_for_size(i, width, height, st, at)
  File "renpy/display/render.pyx", line 310, in renpy.display.render.render_for_size (gen\renpy.display.render.c:4391)
    return render(d, width, height, st, at)
  File "renpy/display/render.pyx", line 259, in renpy.display.render.render (gen\renpy.display.render.c:3520)
    rv = d.render(widtho, heighto, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\behavior.py", line 774, in render
    rv = super(Button, self).render(width, height, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\layout.py", line 1155, in render
    back = render(style.background, bw, bh, st, at)
  File "renpy/display/render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:4075)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 259, in renpy.display.render.render (gen\renpy.display.render.c:3520)
    rv = d.render(widtho, heighto, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\imagelike.py", line 272, in render
    crend = render(image, width, height, st, at)
  File "renpy/display/render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:4075)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 259, in renpy.display.render.render (gen\renpy.display.render.c:3520)
    rv = d.render(widtho, heighto, st, at)
  File "H:\renpy-7.3.5-sdk\renpy\display\image.py", line 729, in render
    self.find_target()
  File "H:\renpy-7.3.5-sdk\renpy\display\image.py", line 651, in find_target
    raise Exception(error)
Exception: DynamicImage [u'gui/button/navigation_[prefix_]background.png', u'gui/button/[prefix_]background.png']: could not find image. (u'gui/button/navigation_idle_background.png', u'gui/button/navigation_background.png', and 2 more.)

Windows-7-6.1.7601-SP1
Ren'Py 7.3.5.606
The meeting at the Spa 1.0
Wed Jan 01 18:07:37 2020
getting the feeling im missing some files....
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
Hi! I'm having the same problem with RenPy. Could you tell me how did you solve it??

In the original case, they were missing some image files.

If you look at the bottom of the exception list, you'll see the line:

Code:
Exception: DynamicImage [u'gui/button/navigation_[prefix_]background.png', u'gui/button/[prefix_]background.png']: could not find image. (u'gui/button/navigation_idle_background.png', u'gui/button/navigation_background.png', and 2 more.)

Breaking that down a bit...

Code:
Exception: DynamicImage

[u'gui/button/navigation_[prefix_]background.png', u'gui/button/[prefix_]background.png']: could not find image. 

(u'gui/button/navigation_idle_background.png', u'gui/button/navigation_background.png', and 2 more.)

So the game was expecting to find some specific files in the /game/gui/ folder and couldn't.

In this case, the dev was using filenames with variables in the middle (the [prefix_]). So it could be the variable was wrong. But based on the reply, it looks more like either the files weren't there at all - or weren't in the correct folder (probably in /game/images/ instead of /game/gui/.

If you're seeing similar messages... then the cause is likely similar too. Files missing, files incorrectly named or files stored in the wrong folder.

As a suggestion... Start the RenPy Launcher, select your project and run "Check Script (Lint)" under the "Actions" lists near the bottom center of the window. It will check your code as best it can and tell you about any potential problems... including the names of files that might be missing. As an automated tool, it's not as good as actual testing... but it's really good at catching this sort of stuff before it becomes a serious issue.
 

takeham

New Member
Apr 27, 2021
2
0
So the game was expecting to find some specific files in the /game/gui/ folder and couldn't.

In this case, the dev was using filenames with variables in the middle (the [prefix_]). So it could be the variable was wrong. But based on the reply, it looks more like either the files weren't there at all - or weren't in the correct folder (probably in /game/images/ instead of /game/gui/.

If you're seeing similar messages... then the cause is likely similar too. Files missing, files incorrectly named or files stored in the wrong folder.

As a suggestion... Start the RenPy Launcher, select your project and run "Check Script (Lint)" under the "Actions" lists near the bottom center of the window. It will check your code as best it can and tell you about any potential problems... including the names of files that might be missing. As an automated tool, it's not as good as actual testing... but it's really good at catching this sort of stuff before it becomes a serious issue.
Hi! Thx for explaining it, I'm a newbie in RenPy, so very appreciated.
I checked the game directory and couldn't find any other images outside "gui", not even in "images". In the end, I just copied some images from the demo project and copied them to the game directory, and voila, no more error. Tho, even if I fixed the problem temporarily Renpy will keep creating projects without some assets. Guess I'll just have to cope with that.