[SOLVED] "has side" causing "A side has the wrong number of children" exception after updating from Renpy 6.99 to 7.3.5

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
hassohappa
Regular
Posts: 33
Joined: Thu Oct 22, 2015 8:51 pm
Tumblr: me-patra
Contact:

[SOLVED] "has side" causing "A side has the wrong number of children" exception after updating from Renpy 6.99 to 7.3.5

#1 Post by hassohappa »

After updating my project from Renpy 6.99.12.4 to 7.3.5, my nvl screen now throws some exceptions, including "A side has the wrong number of children".

The problem is here:

Code: Select all

frame:
            xpos 0 ypos 0
            background "gui/nvl.png"
            has side "c r": #used to move choices under dialogue box like https://lemmasoft.renai.us/forums/viewtopic.php?t=44836
                area (300, 0, 820, 680)
I guess the "c r" part now has the wrong number of stuff, but I'm stumped on what it wants me to put instead?

Here's the traceback for good measure.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/1_diya.rpy", line 2631, in script
    $nvlShow()
  File "game/1_diya.rpy", line 2631, in <module>
    $nvlShow()
  File "game/script.rpy", line 231, in nvlShow
    nvl_show(config.adv_nvl_transition)
  File "renpy/common/00nvl_mode.rpy", line 250, in nvl_show
    renpy.with_statement(with_)
Exception: A side has the wrong number of children.

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

Full traceback:
  File "game/1_diya.rpy", line 2631, in script
    $nvlShow()
  File "C:\Users\Brianna\Documents\Programs\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 "C:\Users\Brianna\Documents\Programs\renpy-7.3.5-sdk\renpy\python.py", line 2028, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/1_diya.rpy", line 2631, in <module>
    $nvlShow()
  File "game/script.rpy", line 231, in nvlShow
    nvl_show(config.adv_nvl_transition)
  File "renpy/common/00nvl_mode.rpy", line 250, in nvl_show
    renpy.with_statement(with_)
  File "C:\Users\Brianna\Documents\Programs\renpy-7.3.5-sdk\renpy\exports.py", line 1601, in with_statement
    return renpy.game.interface.do_with(trans, paired, clear=clear)
  File "C:\Users\Brianna\Documents\Programs\renpy-7.3.5-sdk\renpy\display\core.py", line 2251, in do_with
    clear=clear)
  File "C:\Users\Brianna\Documents\Programs\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 "C:\Users\Brianna\Documents\Programs\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 "C:\Users\Brianna\Documents\Programs\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 "C:\Users\Brianna\Documents\Programs\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 "C:\Users\Brianna\Documents\Programs\renpy-7.3.5-sdk\renpy\display\transition.py", line 361, in render
    top = render(self.new_widget, 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 "C:\Users\Brianna\Documents\Programs\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 "C:\Users\Brianna\Documents\Programs\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 "C:\Users\Brianna\Documents\Programs\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 "C:\Users\Brianna\Documents\Programs\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 "C:\Users\Brianna\Documents\Programs\renpy-7.3.5-sdk\renpy\display\layout.py", line 1127, in render
    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 "C:\Users\Brianna\Documents\Programs\renpy-7.3.5-sdk\renpy\display\layout.py", line 1547, in render
    raise Exception("A side has the wrong number of children.")
Exception: A side has the wrong number of children.

Windows-8-6.2.9200
Ren'Py 7.3.5.606
Butterfly Soup 2.12
Tue Aug 04 17:43:10 2020
Last edited by hassohappa on Wed Aug 05, 2020 6:19 pm, edited 2 times in total.

User avatar
Jackkel Dragon
Veteran
Posts: 283
Joined: Mon Mar 31, 2014 7:17 pm
Organization: Nightshade, Team Despair
itch: jackkel-dragon
Location: USA
Contact:

Re: "has side" causing "A side has the wrong number of children" exception after updating from Renpy 6.99 to 7.3.5

#2 Post by Jackkel Dragon »

I recall having an issue like this before. I believe older versions of Ren'Py didn't really look too deeply into the arguments you give the "side" command, but now you have to do it one of two ways. I forgot one of them, but the other one (using the placement arguments like c, l, r, etc.) requires there to be EXACTLY as many arguments as there are children of the "side".

Based on the snippet of code you showed, it looks like the side is given two arguments: c and r (center and right). So the first child is centered, then the second one is aligned to mid-right. But then you only give the side one child ("area"), so there's an extra "r" that has nothing to be applied to.

Personally, I'd refactor this code to not use the side command. But if you want to keep things as-is, I think removing the "r" from the side's argument list might fix the problem?
Main Website
Includes information about and links to many of my current and past projects.

Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series

User avatar
hassohappa
Regular
Posts: 33
Joined: Thu Oct 22, 2015 8:51 pm
Tumblr: me-patra
Contact:

Re: "has side" causing "A side has the wrong number of children" exception after updating from Renpy 6.99 to 7.3.5

#3 Post by hassohappa »

Thanks so much, removing the "r" worked! Marked as solved now.

Post Reply

Who is online

Users browsing this forum: No registered users