Game crashes: doesn't recognize existing image & module obj

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
LinWest
Regular
Posts: 97
Joined: Sun May 16, 2010 4:12 pm
Projects: Painted Walls, Pyrexia, & a secret
Location: Midwest
Contact:

Game crashes: doesn't recognize existing image & module obj

#1 Post by LinWest »

I built my game distribution, and opened it to find it crashes.
IOError: Couldn't find file 'b.png'.
While running game code:
- script call at line 731 of renpy-6.11.0/common/00library.rpy
- script at line 174 of renpy-6.11.0/common/00gltest.rpy
- python at line 174 of renpy-6.11.0/common/00gltest.rpy.
- python at line 140 of renpy-6.11.0/common/00gltest.rpy.
in the game directory it's call
b.png

in the init I defined it
image black = "b.png"

indentation is correct, case is correct, and spelling is correct. I even resaved it as a .png to make sure the filetype was correct. So why does ren'py say it can't find it? Do I need to reset something? It's driving me mad!

EDIT:

Oh awesome! So I resaved "b.png" it to a .gif, changed it in the definitions, and apparently it's OK with that. But now the same things happening with an image I have called "splash.png" and complaining about something new and vague:
AttributeError: 'module' object has no attribute 'Screen'

While loading the script.
I have no idea.
Lin West @Deviant Art

Working on:

User avatar
Alex
Lemma-Class Veteran
Posts: 3093
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Game crashes: doesn't recognize existing image & module

#2 Post by Alex »

Silly questions:
- in what version of Ren'py you made game distribution?
- did you opened several different versions of Ren'py before made it?
Silly advice - reboot and rebuild distribution.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Game crashes: doesn't recognize existing image & module

#3 Post by PyTom »

LinWest, can you post the file "traceback.txt" that's created when the error occurs?

Thanks.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

LinWest
Regular
Posts: 97
Joined: Sun May 16, 2010 4:12 pm
Projects: Painted Walls, Pyrexia, & a secret
Location: Midwest
Contact:

Re: Game crashes: doesn't recognize existing image & module

#4 Post by LinWest »

Well I searched the module object screen on google and took this guy's advice to rename the final project file http://www.facebook.com/topic.php?uid=2 ... topic=6987, and then restarted my computer. I originally was making the game in Ren'py 10, but then built the game in Renpy 11 since you're supposed to update before releasing, yes?

Here's the full traceback.
I'm sorry, but an uncaught exception occurred.

IOError: Couldn't find file 'splash.png'.

While running game code:
- script at line 784 of renpy-6.11.0/common/00library.rpy
- python at line 788 of renpy-6.11.0/common/00library.rpy.
- script at line 23 of renpy-6.11.0/common/_layout/classic_main_menu.rpym

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

File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/bootstrap.py", line 252, in bootstrap
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/main.py", line 310, in main
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/main.py", line 93, in run
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/execution.py", line 250, in run
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/ast.py", line 567, in execute
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/python.py", line 957, in py_exec_bytecode
File "renpy-6.11.0/common/00library.rpy", line 788, in <module>
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/game.py", line 297, in call_in_new_context
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/execution.py", line 250, in run
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/ast.py", line 567, in execute
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/python.py", line 957, in py_exec_bytecode
File "renpy-6.11.0/common/_layout/classic_main_menu.rpym", line 56, in <module>
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/ui.py", line 216, in interact
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/display/core.py", line 1607, in interact
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/display/core.py", line 1798, in interact_core
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/display/core.py", line 262, in predict
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/display/core.py", line 236, in visit_all
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/display/core.py", line 262, in <lambda>
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/display/im.py", line 459, in predict_one
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/display/im.py", line 197, in get
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/display/im.py", line 488, in load
File "/Users/lmathers/Desktop/PaintedWalls-1.0-mac/redwalls.app/Contents/Resources/autorun/renpy/loader.py", line 319, in load
IOError: Couldn't find file 'splash.png'.

While running game code:
- script at line 784 of renpy-6.11.0/common/00library.rpy
- python at line 788 of renpy-6.11.0/common/00library.rpy.
- script at line 23 of renpy-6.11.0/common/_layout/classic_main_menu.rpym

Ren'Py Version: Ren'Py 6.11.0l
Once again, filenames the same, spelling is correct, case is all the same, and I resaved it as a .png again to make sure.
Lin West @Deviant Art

Working on:

LinWest
Regular
Posts: 97
Joined: Sun May 16, 2010 4:12 pm
Projects: Painted Walls, Pyrexia, & a secret
Location: Midwest
Contact:

Re: Game crashes: doesn't recognize existing image [SOLVED!]

#5 Post by LinWest »

I tried renaming the "splash.png" file to "main.png" and resaved the image file as that name. It still can't find it. Tried building in both renpy 10 and renpy 11 and I get the same error.

Can someone please help me?


**EDIT**

Aleema saves the day. I had .png marked down as exclude extensions. Finally I post my game! <3
Lin West @Deviant Art

Working on:

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]