grumpyhome / grumpy

Grumpy is a Python to Go source code transcompiler and runtime.
Apache License 2.0
420 stars 18 forks source link

email-parser #50

Open alanjds opened 6 years ago

alanjds commented 6 years ago

google/grumpy#338 opened by @piyu7274 on Jun 28, 2017

Traceback (most recent call last):
  File "tools/grumpc", line 118, in <module>
    sys.exit(main(parser.parse_args()))
  File "tools/grumpc", line 76, in main
    visitor.visit(mod)
  File "/home/avdhesh/grumpy/build/lib/python2.7/site-packages/grumpy/pythonparser/algorithm.py", line 41, in visit
    return self._visit_one(obj)
  File "/home/avdhesh/grumpy/build/lib/python2.7/site-packages/grumpy/pythonparser/algorithm.py", line 32, in _visit_one
    return getattr(self, visit_attr)(node)
  File "/home/avdhesh/grumpy/build/lib/python2.7/site-packages/grumpy/compiler/stmt.py", line 320, in visit_Module
    self._visit_each(node.body)
  File "/home/avdhesh/grumpy/build/lib/python2.7/site-packages/grumpy/compiler/stmt.py", line 734, in _visit_each
    self.visit(node)
  File "/home/avdhesh/grumpy/build/lib/python2.7/site-packages/grumpy/pythonparser/algorithm.py", line 41, in visit
    return self._visit_one(obj)
  File "/home/avdhesh/grumpy/build/lib/python2.7/site-packages/grumpy/pythonparser/algorithm.py", line 32, in _visit_one
    return getattr(self, visit_attr)(node)
  File "/home/avdhesh/grumpy/build/lib/python2.7/site-packages/grumpy/compiler/stmt.py", line 296, in visit_ImportFrom
    for imp in self.block.root.importer.visit(node):
  File "/home/avdhesh/grumpy/build/lib/python2.7/site-packages/grumpy/pythonparser/algorithm.py", line 41, in visit
    return self._visit_one(obj)
  File "/home/avdhesh/grumpy/build/lib/python2.7/site-packages/grumpy/pythonparser/algorithm.py", line 32, in _visit_one
    return getattr(self, visit_attr)(node)
  File "/home/avdhesh/grumpy/build/lib/python2.7/site-packages/grumpy/compiler/imputil.py", line 137, in visit_ImportFrom
    member_imp = resolver(node, node.module)
  File "/home/avdhesh/grumpy/build/lib/python2.7/site-packages/grumpy/compiler/imputil.py", line 153, in _resolve_import
    raise util.ImportError(node, 'no such module: {}'.format(modname))
grumpy.compiler.util.ImportError: line 35: no such module: email.parser
alanjds commented 6 years ago

Comment by piyu7274 Wednesday Jun 28, 2017 at 08:48 GMT


how can i solve this

alanjds commented 6 years ago

Comment by aisk Wednesday Jun 28, 2017 at 09:49 GMT


Don't know what the source code you were compiling, but it looks like the email module is not ported to grumpy currently.

I think you can do this if you have interest.