[SOLVED] Weird <'unicode' object is not callable> error

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
Segaz3
Newbie
Posts: 4
Joined: Tue Jul 21, 2020 9:43 am
Contact:

[SOLVED] Weird <'unicode' object is not callable> error

#1 Post by Segaz3 »

Ren'py can't apparently read "menu:" because 'unicode' object is not callable. The code is literally a choice.
Traceback:
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/script.rpy", line 171, in script
menu:
TypeError: 'unicode' object is not callable

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

Full traceback:
File "game/script.rpy", line 171, in script
menu:
File "renpy/ast.py", line 1682, in execute
choice = renpy.exports.menu(choices, self.set, args, kwargs, item_arguments)
File "renpy/exports.py", line 1062, in menu
rv = renpy.store.menu(new_items)
TypeError: 'unicode' object is not callable

Windows-10-10.0.19041
Ren'Py 7.4.6.1693
Addicted to Minecraft 1.0
Fri Jun 18 15:06:28 2021
What's even funnier is that, thinking I had made some errors while writing the choice, I tried to copy a random choice from another game of mine which works totally fine and paste it onto my current game. Guess what? It results in the same error.

This is the code:

Code: Select all

    menu:
        "Drink":
            text "aa"
        "Don't drink":
            text "bb"
Last edited by Segaz3 on Fri Jun 18, 2021 9:23 am, edited 1 time in total.

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

Re: Weird <'unicode' object is not callable> error

#2 Post by Ocelot »

Do you be any chance have a variable named 'menu' somewhere?
< < insert Rick Cook quote here > >

Segaz3
Newbie
Posts: 4
Joined: Tue Jul 21, 2020 9:43 am
Contact:

Re: Weird <'unicode' object is not callable> error

#3 Post by Segaz3 »

Ocelot wrote: Fri Jun 18, 2021 9:17 am Do you be any chance have a variable named 'menu' somewhere?
Oh my, I had a "menu" theme. Thank you so much for your help.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]