victorlei / smop

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

fixed AttributeError 'node' to '_node'. #190

Closed skoopsy closed 3 weeks ago

skoopsy commented 7 months ago

Was getting this error when running smop3:

Traceback (most recent call last): File ".../smop/main.py", line 66, in main G = resolve.resolve(stmt_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".../smop/resolve.py", line 66, in resolve G.node[n]["label"] = "%s\n%s" % (n, u.props) ^^^^^^ AttributeError: 'DiGraph' object has no attribute 'node'. Did you mean: '_node'? Errors: 1

Fixed by following the AttributError message for lines 54 and 66. Maybe node library changed.