AttributeError: 'MultiBox' object has no attribute 'slow'

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
Victorius
Regular
Posts: 30
Joined: Thu Jan 14, 2021 7:02 pm
Projects: Astral Lust
Github: Victorius-Astral
Contact:

AttributeError: 'MultiBox' object has no attribute 'slow'

#1 Post by Victorius »

Hey! I've run into this problem. It's probably related to offscreen vbox. It happens once every 5 times I try switching two character stat screens (example below).

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/places/hotel/player/pc.rpy", line 12, in script call
    call screen pc
  File "game/places/hotel/grace/room.rpy", line 18, in script call
    call screen hotel_grace
  File "game/characters/grace/speak.rpy", line 49, in script call
    call grace_kiss(outfit = outfit)
  File "game/places/hotel/alice/room.rpy", line 15, in script call
    call screen hotel_alice
  File "game/functions/qol/auto_rest.rpy", line 10, in script call
    call room_player_bed.rest(show_dialogue = False) from _call_room_player_bed_rest
  File "game/places/hotel/alice/room.rpy", line 15, in script call
    call screen hotel_alice
  File "game/functions/qol/auto_rest.rpy", line 10, in script call
    call room_player_bed.rest(show_dialogue = False) from _call_room_player_bed_rest
  File "game/places/hotel/alice/room.rpy", line 15, in script call
    call screen hotel_alice
  File "game/places/hotel/f1/room.rpy", line 27, in script call
    call screen hotel_f1b
  File "game/places/hotel/grace/room.rpy", line 18, in script call
    call screen hotel_grace
  File "game/characters/grace/speak.rpy", line 49, in script call
    call grace_kiss(outfit = outfit)
  File "game/places/hotel/grace/room.rpy", line 18, in script call
    call screen hotel_grace
  File "game/characters/grace/speak.rpy", line 49, in script call
    call grace_kiss(outfit = outfit)
  File "game/places/hotel/grace/room.rpy", line 18, in script
    call screen hotel_grace
  File "renpy/common/000statements.rpy", line 569, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "game/screens/menus/girls/alice.rpy", line 1, in execute
    screen g_alice():
  File "game/screens/menus/girls/alice.rpy", line 1, in execute
    screen g_alice():
  File "game/screens/menus/girls/alice.rpy", line 5, in execute
    hbox:
  File "game/screens/menus/girls/alice.rpy", line 12, in execute
    vbox:
  File "game/screens/menus/girls/alice.rpy", line 40, in execute
    text _("• Kisses: ") + str(Alice.stat_kiss) size gui.game_text_medium xoffset gui.game_spacing
AttributeError: 'MultiBox' object has no attribute 'slow'

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

Full traceback:
  File "game/places/hotel/player/pc.rpy", line 12, in script call
    call screen pc
  File "game/places/hotel/grace/room.rpy", line 18, in script call
    call screen hotel_grace
  File "game/characters/grace/speak.rpy", line 49, in script call
    call grace_kiss(outfit = outfit)
  File "game/places/hotel/alice/room.rpy", line 15, in script call
    call screen hotel_alice
  File "game/functions/qol/auto_rest.rpy", line 10, in script call
    call room_player_bed.rest(show_dialogue = False) from _call_room_player_bed_rest
  File "game/places/hotel/alice/room.rpy", line 15, in script call
    call screen hotel_alice
  File "game/functions/qol/auto_rest.rpy", line 10, in script call
    call room_player_bed.rest(show_dialogue = False) from _call_room_player_bed_rest
  File "game/places/hotel/alice/room.rpy", line 15, in script call
    call screen hotel_alice
  File "game/places/hotel/f1/room.rpy", line 27, in script call
    call screen hotel_f1b
  File "game/places/hotel/grace/room.rpy", line 18, in script call
    call screen hotel_grace
  File "game/characters/grace/speak.rpy", line 49, in script call
    call grace_kiss(outfit = outfit)
  File "game/places/hotel/grace/room.rpy", line 18, in script call
    call screen hotel_grace
  File "game/characters/grace/speak.rpy", line 49, in script call
    call grace_kiss(outfit = outfit)
  File "game/places/hotel/grace/room.rpy", line 18, in script
    call screen hotel_grace
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/ast.py", line 2010, in execute
    self.call("execute")
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/ast.py", line 1998, in call
    return renpy.statements.call(method, parsed, *args, **kwargs)
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/statements.py", line 278, in call
    return method(parsed, *args, **kwargs)
  File "renpy/common/000statements.rpy", line 569, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/exports.py", line 3132, in call_screen
    rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/ui.py", line 298, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/display/core.py", line 3276, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/display/core.py", line 3691, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/display/screen.py", line 432, in visit_all
    callback(self)
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/display/core.py", line 3691, in <lambda>
    root_widget.visit_all(lambda i : i.per_interact())
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/display/screen.py", line 443, in per_interact
    self.update()
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/display/screen.py", line 631, in update
    self.screen.function(**self.scope)
  File "game/screens/menus/girls/alice.rpy", line 1, in execute
    screen g_alice():
  File "game/screens/menus/girls/alice.rpy", line 1, in execute
    screen g_alice():
  File "game/screens/menus/girls/alice.rpy", line 5, in execute
    hbox:
  File "game/screens/menus/girls/alice.rpy", line 12, in execute
    vbox:
  File "game/screens/menus/girls/alice.rpy", line 40, in execute
    text _("• Kisses: ") + str(Alice.stat_kiss) size gui.game_text_medium xoffset gui.game_spacing
  File "D:\Renpy\renpy-7.4.6-sdk/renpy/text/text.py", line 1569, in __init__
    self.slow = replaces.slow
AttributeError: 'MultiBox' object has no attribute 'slow'

Windows-10-10.0.19041
Ren'Py 7.4.7.1841
Astral Lust 0.1.7c
Fri Jul 23 20:14:39 2021
This is the code:

Code: Select all

screen g_cat():
    tag girls
    zorder 92

    hbox:
        xpos gui.game_width_fifth
        box_wrap True
        spacing gui.game_spacing_super

        add "Obj/girl_cat.webp" # 1200 x 2160

        vbox:
            ypos gui.game_spacing_small
            box_wrap True
            xmaximum gui.inter_girl_xmaximum

            if Cat.name != "Cat":
                text _("{gold}[cat] (Cat){/gold}") size gui.game_text_title

            else:
                text _("{gold}[cat]{/gold}") size gui.game_text_title

            label _("\nEmotions") text_size gui.game_text_big

            text _("• {love}Affection: ") + str(Cat.love) + "{/love}" size gui.game_text_medium xoffset gui.game_spacing
            text _("• {trust}Trust: ") + str(Cat.trust) + "{/trust}" size gui.game_text_medium xoffset gui.game_spacing

            label _("\nStatistics") text_size gui.game_text_big

            text _("• Pats: ") + str(Cat.stat_pat) size gui.game_text_medium xoffset gui.game_spacing

        vbox:
            ypos gui.game_spacing_small
            box_wrap True
            xmaximum gui.inter_girl_xmaximum

            null height gui.girl_null

            if not persistent.mode_sfw:
                use stpos_counter(npc = Cat)

screen stpos_counter(npc):
	
    # Assign npc's stpos dict to sp variable
    $ sp = npc.stat_stpos

    if sp:
        label _("\nExperience") text_size gui.game_text_big

    # Iterate all added positions
    for po in sp:

        # If localization exists show position and its counter
        if po in stpos:

            text stpos[po] + ": " + str(sp[po]) size gui.game_text_medium xoffset gui.game_spacing

        # Or if doesn't exist, but modder mode is on, show id & counter
        elif _modder:

            text str(po) + ": " + str(sp[po]) size gui.game_text_medium xoffset gui.game_spacing

After removing this part from all my screens it doesn't crash.

Code: Select all

	vbox:
            ypos gui.game_spacing_small
            box_wrap True
            xmaximum gui.inter_girl_xmaximum

            null height gui.girl_null

            if not persistent.mode_sfw:
                use stpos_counter(npc = Cat)
Last edited by Victorius on Fri Jul 23, 2021 2:37 pm, edited 1 time in total.

Victorius
Regular
Posts: 30
Joined: Thu Jan 14, 2021 7:02 pm
Projects: Astral Lust
Github: Victorius-Astral
Contact:

Re: AttributeError: 'MultiBox' object has no attribute 'slow'

#2 Post by Victorius »

Alright, I've tried deleting `xmaximum gui.inter_girl_xmaximum` from the code, and it stopped giving errors. So this is probably something with offscreen things (but no, nothing visible was offscreen, but vbox xsize might've been more than screen width)

Code: Select all

       vbox:
            ypos gui.game_spacing_small
            box_wrap True
            #xmaximum gui.inter_girl_xmaximum

            null height gui.girl_null

            if not persistent.mode_sfw:
                use stpos_counter(npc = Cat)

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: AttributeError: 'MultiBox' object has no attribute 'slow'

#3 Post by hell_oh_world »

I'm guessing you're using strings inside your screens with some text tags? such as {fast}? afaik that won't work as it is only designed for dialogues.

Victorius
Regular
Posts: 30
Joined: Thu Jan 14, 2021 7:02 pm
Projects: Astral Lust
Github: Victorius-Astral
Contact:

Re: AttributeError: 'MultiBox' object has no attribute 'slow'

#4 Post by Victorius »

hell_oh_world wrote: Fri Jul 23, 2021 8:15 pm I'm guessing you're using strings inside your screens with some text tags? such as {fast}? afaik that won't work as it is only designed for dialogues.
Text tags worked perfectly inside screens, at least they used to. As far as I understand renpy 'dialogues' are nothing else than say screen, code wise there is no difference between dialogue and screen text displayable.

Besides I've shown screen code above? There are no text tags. And these 'strings' are integers, that's why I use str() method to convert them. And as I've explained in my second post, deleting xmaximum worked.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot]