[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
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

Relative imports not supported: `from . import xxx` #62

Closed
mtunique opened this issue Jan 7, 2017 · 2 comments
Closed

Relative imports not supported: `from . import xxx` #62

mtunique opened this issue Jan 7, 2017 · 2 comments

Comments

Copy link

mtunique commented Jan 7, 2017

File "/Users/xxx/grumpy/build/lib/python2.7/site-packages/grumpy/compiler/stmt.py", line 302, in visit_Module
self._visit_each(node.body)
File "/Users/xxx/grumpy/build/lib/python2.7/site-packages/grumpy/compiler/stmt.py", line 632, in _visit_each
self.visit(node)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "/Users/xxx/grumpy/build/lib/python2.7/site-packages/grumpy/compiler/stmt.py", line 270, in visit_ImportFrom
if node.module.startswith(_NATIVE_MODULE_PREFIX):
AttributeError: 'NoneType' object has no attribute 'startswith'

Copy link
Collaborator

trotterdylan commented Jan 7, 2017

Thanks for the issue report! I think properly supporting relative imports will take some time, but in the mean time we should at least give a more meaningful error message.

trotterdylan changed the title `from . import xxx` don't support Relative imports not supported: `from . import xxx` Jan 9, 2017
Copy link
Collaborator

trotterdylan commented Jun 29, 2017

This was fixed in #284

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

Successfully merging a pull request may close this issue.

None yet
2 participants