[SOLVED] screens.rpy Exception: Not a Displayable: None

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
User avatar
78909087
Veteran
Posts: 277
Joined: Sat Aug 16, 2014 2:33 pm
Completed: Dungeons and Don't Do It, Wake Up
Projects: Lethe
IRC Nick: Pacermist
Contact:

[SOLVED] screens.rpy Exception: Not a Displayable: None

#1 Post by 78909087 »

Just trying to add imagebuttons (not exactly a genius and I'm EXTREMELY new to this.)
My screens.rpy (where I believe the error may lay- considering I haven't edited anything else) reads as follows.

screen main_menu:
tag menu
add "wut.jpg"
$ y=114
imagebutton auto "gui/Buttonstart_%s.png" xpos 773 ypos y focus_mask True action Start()
$ y+=71 # We increase y position for the next menu item. y has a value of 185(114+81=185) now. We could also use: xpos 773 ypos 185
imagebutton auto "gui/Buttonload_%s.jpg" xpos 773 ypos y focus_mask True action ShowMenu('load')
$ y+=71
imagebutton auto "gui/Buttonconfig_%s.jpg" xpos 773 ypos y focus_mask True action ShowMenu('preferences')
$ y+=71
imagebutton auto "gui/Buttonquit_%s.jpg" xpos 773 ypos y focus_mask True action Quit(confirm=False)


When attempting to launch, the error I get is:

I'm sorry, but an uncaught exception occurred.

While running game code:
File "renpy/common/_layout/screen_main_menu.rpym", line 29, in script
File "game/screens.rpy", line 181, in python
Exception: Not a displayable: None

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

Full traceback:
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\execution.py", line 294, in run
node.execute()
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\ast.py", line 732, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\python.py", line 1358, in py_exec_bytecode
exec bytecode in globals, locals
File "renpy/common/_layout/screen_main_menu.rpym", line 29, in <module>
$ ui.interact()
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\ui.py", line 237, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\display\core.py", line 1993, in interact
repeat, rv = self.interact_core(preloads=preloads, **kwargs)
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\display\core.py", line 2235, in interact_core
root_widget.visit_all(lambda i : i.per_interact())
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\display\core.py", line 298, in visit_all
d.visit_all(callback)
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\display\core.py", line 298, in visit_all
d.visit_all(callback)
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\display\core.py", line 298, in visit_all
d.visit_all(callback)
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\display\core.py", line 300, in visit_all
callback(self)
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\display\core.py", line 2235, in <lambda>
root_widget.visit_all(lambda i : i.per_interact())
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\display\screen.py", line 166, in per_interact
self.update()
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\display\screen.py", line 266, in update
self.screen.function(**self.scope)
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\screenlang.py", line 1236, in __call__
renpy.python.py_exec_bytecode(self.code.bytecode, locals=scope)
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\python.py", line 1358, in py_exec_bytecode
exec bytecode in globals, locals
File "game/screens.rpy", line 181, in <module>
imagebutton auto "gui/Buttonstart_%s.png" xpos 773 ypos y focus_mask True action Start()
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\ui.py", line 442, in __call__
w = self.function(*args, **keyword)
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\ui.py", line 858, in _imagebutton
**properties)
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\display\behavior.py", line 725, in __init__
idle_ = renpy.easy.displayable(idle_image),
File "F:\SBServer\Elonal\Krystal's testtttt\New folder\renpy-6.16.3-sdk\renpy\easy.py", line 129, in displayable
raise Exception("Not a displayable: %r" % (d,))
Exception: Not a displayable: None


I know it's probably something really stupid but I really need help, and if it's easy to answer, all the better... I hope.
Last edited by 78909087 on Sun Sep 28, 2014 1:41 am, edited 1 time in total.

User avatar
78909087
Veteran
Posts: 277
Joined: Sat Aug 16, 2014 2:33 pm
Completed: Dungeons and Don't Do It, Wake Up
Projects: Lethe
IRC Nick: Pacermist
Contact:

Re: screens.rpy Exception: Not a Displayable: None

#2 Post by 78909087 »

I've found a fix by using a completely different code. But if anyone can fix with the current code, that would be very much appreciated.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: screens.rpy Exception: Not a Displayable: None

#3 Post by Donmai »

Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
fluxus
Regular
Posts: 133
Joined: Thu Jun 19, 2014 8:06 am
Projects: Animal Anaesthesia (a teaching game)
Contact:

Re: screens.rpy Exception: Not a Displayable: None

#4 Post by fluxus »

What is probably happening is that Ren'Py wants an image defined which you're not defining. Thus you have a 'None' type where Ren'Py expects an image.

Imagebutton expects, if I recall correctly (not a certainty), as a minimum, an image for hover and an image for idle. So you need to have those.

For checking, I'd drop the auto for now, only define one imagebutton, and do that manually. That way you'll know exactly what is happening and what isn't, and when you get it to work, you can add the other imagebuttons and eventually put in the auto-function as well, if you feel like it. Personally I like it the manual way - more predictable, and clearer error messages :]

User avatar
dyrarendy
Regular
Posts: 59
Joined: Wed Apr 02, 2014 12:26 pm
Projects: Visual Novel Dating Sims Masa SMA
Location: Indonesia, Cimahi
Contact:

Re: screens.rpy Exception: Not a Displayable: None

#5 Post by dyrarendy »

Make sure u have :

gui/Buttonstart_hover.png
gui/Buttonstart_idle.png

and so on.
My Project :
Image

Post Reply

Who is online

Users browsing this forum: Google [Bot]