Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

KeyError: 'function' not found #50

Open
RishikMani opened this issue Jul 28, 2019 · 1 comment
Open

KeyError: 'function' not found #50

RishikMani opened this issue Jul 28, 2019 · 1 comment

Comments

@RishikMani
Copy link

In the file programs.py inside the function build_subtree, the script tries to create a new key as follows:

def list_to_tree(program_list):
    def build_subtree(cur):
        return {
            'function': cur['function'],
            'value_inputs': [x for x in cur['value_inputs']],
            'inputs': [build_subtree(program_list[i]) for i in cur['inputs']],
        }
    return build_subtree(program_list[-1])

I have tried generating new images with new questions, but never I see the key function in cur[function]. Has it happened with anyone else? Were you able to resolve it?

@mweiss17
Copy link

ya this happened to me -- I'm vaguely thinking it's a versioning issue. I changed the keyword "function" to "type" and that seemed to fix it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants