AttributeError("'module' object has no attribute 'Declare'",)
jwmelto opened this issue · 0 comments
jwmelto commented
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.