question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Message function definition not working

See original GitHub issue

Thank you for this! It’s a lot of fun to work with! I tried creating a function for the message to return a string but functions for message doesn’t seem to be working (even though docs say otherwise).

def _confirm_options(answers):
    message = "Confirm choices: " + str(answers)
    return message

group_choices = [
    {
        "type": "input",
        "name": "group_id",
        "message": "Enter id of parent group",
    },
    {
        "type": "input", 
        "name": "group_name", 
        "message": "Enter desired group name"},
    {
        "type": "confirm",
        "name": "confirm",
        "message": _confirm_options,
        "default": True,
    },
]

result is this: ? <function <lambda> at 0x10f287a60> (Y/n)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

3reactions
nabeelsherazicommented, Nov 13, 2020

Just ran into the same issue. Thanks @elyscape for showing the solution. It took about a minute to fix – now the hard part is just getting it pulled in lol. In the meanwhile, I’m using my own branch as a local package.

0reactions
tianshuangcommented, Nov 14, 2022

Any progress on this getting pulled in? Ran into it as well and it would be nice not to have maintain my own fork…

This project appears to be no longer active.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Function definition not found for a function declared inside ...
The solution to all this is very simple: when defining functions declared in the unnamed namespace, just reopen the namespace instead of trying ......
Read more >
Please help! "Error: Function definitions are not permitted in ...
I'm extremely new to Matlab, and I'm working on a homework problem, and I keep coming up with an error... I've written my...
Read more >
"Go to Definition" function is not working for C files #1175
Hello, I´m pretty new to VSCode (coming from Sublime 3) and I can not figure out how to get the "Go to Definition"...
Read more >
error : function definition not allowed here pls help
i got this error message. pls help
Read more >
Code Navigation in Visual Studio Code
Warnings and Errors can provide Code Actions (also known as Quick Fixes) to help fix issues. These will be displayed in the editor...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found