Error: UserParser object has no attribute 'nchildren'

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
Morhighan
Miko-Class Veteran
Posts: 973
Joined: Sun Jun 27, 2010 12:54 pm
Completed: AIdol, When Our Journey Ends, Forgotten Not Lost
Organization: MysteryCorgi
Tumblr: MysteryCorgi
Deviantart: MysteryCorgi
Soundcloud: MysteryCorgi
itch: MysteryCorgi
Location: USA
Contact:

Error: UserParser object has no attribute 'nchildren'

#1 Post by Morhighan » Tue Sep 27, 2016 12:59 pm

Hey there!
I'm not sure what I did but I've been getting this error.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While parsing D:\Visual Novel Projects\Project Files\Connection Pending/game/screens.rpy.
AttributeError: 'UseParser' object has no attribute 'nchildren'
I took a break from coding for a couple weeks so I have no recollection of what I was doing before this started.

I'm going to include the traceback, so if someone could maybe point me in the right direction, that would be awesome! Other files are available upon request.
Attachments
traceback.txt
(2.59 KiB) Downloaded 10 times

User avatar
Morhighan
Miko-Class Veteran
Posts: 973
Joined: Sun Jun 27, 2010 12:54 pm
Completed: AIdol, When Our Journey Ends, Forgotten Not Lost
Organization: MysteryCorgi
Tumblr: MysteryCorgi
Deviantart: MysteryCorgi
Soundcloud: MysteryCorgi
itch: MysteryCorgi
Location: USA
Contact:

Re: Error: UserParser object has no attribute 'nchildren'

#2 Post by Morhighan » Tue Sep 27, 2016 1:18 pm

The problem disappears when I remove this:

Code: Select all

## Profile screen ##############################################################
## 

screen profile():

    tag menu

    use game_menu(_("Profile"), scroll="viewport"):

        style_prefix "profile"

        has vbox:
            xpos 600
            ypos 415
            xmaximum 600
            ymaximum 240
            top_padding 3
            bottom_padding 10
            left_padding 10
            right_padding 10
            vbox:
                hbox:
                    xfill True
                    text "Profiles" xpos 30 ypos 0
                    #imagebutton auto "images/interface/cross_%s.png" xalign 1.0 ypos 5 right_padding 7 action Return() 

                
init python:
    profile = Gallery()

    profile.button("profile_1")
    profile.image("profile_andrea.png")
    profile.status("profile1_status")

    fi.transition = dissolve


User avatar
Ocelot
Eileen-Class Veteran
Posts: 1883
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Error: UserParser object has no attribute 'nchildren'

#3 Post by Ocelot » Wed Sep 28, 2016 9:06 am

Default game_menu screen with

Code: Select all

scroll="viewport"
uses following code:

Code: Select all

vbox:
    transclude
In your use statement you have has statement. According to documentation, vbox cannot have has statement.

I think you just need to remove line

Code: Select all

has vbox:
. Otherwise you will have vbox in vbox in vbox which does not make much sense.

Post Reply

Who is online

Users browsing this forum: No registered users