Couldn't find archived files

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
JasonX1140
Newbie
Posts: 11
Joined: Thu Sep 19, 2013 1:28 am
Organization: Visual Notes
Location: Philippines
Contact:

Couldn't find archived files

#1 Post by JasonX1140 »

Hey guys, I need some help regarding the .rpa files.

I made the backgrounds/sprites/etc. their own folders instead of putting them in "game/**.png".
i.e "game/backgrounds/**.png"
(same with sprites/videofx/etc.(sprites goes like this:"game/sprites/(name of character)/**.png")

When I run the game from the Ren'Py Launcher, it goes on smoothly, it loads the game, the backgrounds, the sprites normally.
One sample of how the image file is declared is image bg black = "./backgrounds/black.png" and that's it.
When I archive the file, say: build.archive("images", "all") and then use build.classify("game/**.png", "images") and/or build.classify("game/backgrounds/**.png", "images"), it archives them.

NOTE: That's not the only file it couldn't find.
But when I run the distributed game, the traceback says:

I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/script.rpy", line 7, in script
IOError: Couldn't find file './backgrounds/Black.png'.

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

Full traceback:
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\execution.py", line 288, in run
node.execute()
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\ast.py", line 1110, in execute
renpy.exports.with_statement(trans, paired)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\exports.py", line 946, in with_statement
return renpy.game.interface.do_with(trans, paired, clear=clear)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\core.py", line 1531, in do_with
clear=clear)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\core.py", line 1853, in interact
repeat, rv = self.interact_core(preloads=preloads, **kwargs)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\core.py", line 2165, in interact_core
self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\core.py", line 1420, in draw_screen
renpy.config.screen_height,
File "render.pyx", line 365, in renpy.display.render.render_screen (gen\renpy.display.render.c:4568)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2033)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\layout.py", line 521, in render
surf = render(child, width, height, cst, cat)
File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2291)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2033)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\transition.py", line 176, in render
renpy.display.render.render(self.transitions[-1], width, height, 0, 0)
File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2291)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2033)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\transition.py", line 362, in render
top = render(self.new_widget, width, height, st, at)
File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2291)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2033)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\layout.py", line 521, in render
surf = render(child, width, height, cst, cat)
File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2291)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2033)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\layout.py", line 521, in render
surf = render(child, width, height, cst, cat)
File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2291)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2033)
File "accelerator.pyx", line 109, in renpy.display.accelerator.transform_render (gen\renpy.display.accelerator.c:1298)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2033)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\image.py", line 164, in render
return wrap_render(self.target, width, height, st, at)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\image.py", line 54, in wrap_render
rend = render(child, w, h, st, at)
File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2291)
File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2033)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\im.py", line 465, in render
im = cache.get(self)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\im.py", line 196, in get
surf = image.load()
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\display\im.py", line 509, in load
surf = renpy.display.pgrender.load_image(renpy.loader.load(self.filename), self.filename)
File "C:\Users\Jason\Documents\VN Proj\Erste Liebe-dists\Erste Liebe-win\renpy\loader.py", line 411, in load
raise IOError("Couldn't find file '%s'." % name)
IOError: Couldn't find file './backgrounds/Black.png'.

Windows-7-6.1.7601-SP1
Ren'Py 6.15.7.374
Erste Liebe 0.0

SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: Couldn't find archived files

#2 Post by SundownKid »

If you use:

Code: Select all

    build.classify('game/**.png', 'archive')
    build.classify('game/**.jpg', 'archive')
    build.classify('game/**.rpyc', 'archive')
    build.classify('game/**.ogg', 'archive')
    build.classify('game/**.ogv', 'archive')
it will archive everything in the game folder INCLUDING sub directories. Simply use this code to archive your stuff. .rpy files aren't necessary to run the game.

P.S. You do not need images if you want to make BGs of a solid color. Simply use:

Code: Select all

image bg black = "#000"

User avatar
xavimat
Eileen-Class Veteran
Posts: 1460
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: Couldn't find archived files

#3 Post by xavimat »

I'll add something:
- You only need to archive the images in an 'images' archive-file if you have a reason to archive different types of files in different archives. If you don't have a reason, SundownKid's solution is enough, archive everything in 'archive'.
- The double ** means 'this directory and all the subdirectories'. You only use the single * that means 'only this directory and not the subdirectories' if you have a reason to do that.
- The solid displayable 'black' is already defined in Ren'Py. You can define more colors as SundownKid has said.
- You don't need the period and the first slash in your image definitions: "./background/my_image.png" is the same as "background/my_image.png" (both are assumed to be inside the 'game' directory).
Python considers "Black" and "black" to be different things. Your error says "Black" not found, and your initial explanation talks about the "black" image. Maybe is this?
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)

JasonX1140
Newbie
Posts: 11
Joined: Thu Sep 19, 2013 1:28 am
Organization: Visual Notes
Location: Philippines
Contact:

Re: Couldn't find archived files

#4 Post by JasonX1140 »

Thanks guys!! 'Twas really helpful! And I didnt know about that black thing or solid color! Thanks for that as well!!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Andredron