victorlei / smop

Small Matlab to Python compiler
MIT License
1.08k stars 409 forks source link

Error using SMOP to convert file.m to file.py #163

Open smoothli opened 4 years ago

smoothli commented 4 years ago

Hi, I have to run several Matlab codes in a program written in Python language, so I wanted to convert them in Phyton language (let Python read the MatLab code itself is too time consuming for my application).

I tried using SMOP, but when in the compiler I write smop file.m it appears this issue: /opt/anaconda3/lib/python3.7/site-packages/ply/lex.py:760: FutureWarning: Possible nested set at position 65 c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), self.reflags) /opt/anaconda3/lib/python3.7/site-packages/ply/lex.py:498: FutureWarning: Possible nested set at position 118 lexre = re.compile(regex, reflags) str Traceback (most recent call last): File "/opt/anaconda3/lib/python3.7/site-packages/smop/main.py", line 66, in main G = resolve.resolve(stmt_list) File "/opt/anaconda3/lib/python3.7/site-packages/smop/resolve.py", line 54, in resolve u = G.node[n]["ident"] AttributeError: 'DiGraph' object has no attribute 'node' Errors: 1

smoothli commented 4 years ago

Does anyone have the same problem? And how to resolve it? Maybe I missed something that must be installed in Python ?

Thanks

neoteristis commented 4 years ago

Hi ! I do have the same problem and can't find how to resolve it :/

FL33TW00D commented 4 years ago

See #153

IsabellLehmann commented 3 years ago

@smoothli @naxomi did you try pip install networkx==1.11 as mentioned in the issue ? For me this worked. If it worked for you too, please close the issue. :)