Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError("'module' object has no attribute 'Declare'",) #136

Open
jwmelto opened this issue Aug 29, 2018 · 0 comments
Open

AttributeError("'module' object has no attribute 'Declare'",) #136

jwmelto opened this issue Aug 29, 2018 · 0 comments

Comments

@jwmelto
Copy link

jwmelto commented Aug 29, 2018

The first pass of parsing a file is reasonable, but leaves a lot of type deduction to the imagination. Now suppose that foo.m.py includes the following structure (where the types have been filled in):

structs = {
    "bar" : {
        "one"   : "int",
        "two"   : "mat",
     },
}

Running m2cpp with this file works just fine.

However, I know that another function is going to use the bar structure, and it accesses member "three". If I try to properly specify the structure as:

structs = {
    "bar" : {
        "one"   : "int",
        "two"   : "mat",
        "three" : "vec",
     },
}

then the next invocation of m2cpp will fail with AttributeError("'module' object has no attribute 'Declare'",). I also notice that there is a leftover .pyc file that isn't there when everything works.

See this isssue on StackOverflow for a hint on where the problem lies.

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

No branches or pull requests

1 participant