Skip to content
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

'No parent module' error #292

Open
dodomorandi opened this issue Mar 21, 2018 · 3 comments
Open

'No parent module' error #292

dodomorandi opened this issue Mar 21, 2018 · 3 comments

Comments

@dodomorandi
Copy link

I am having a strange issue with a false positive error.

I have a typical Python3 project with setup.py and the package directory, with all modules inside and, obviously, the __init__.py file.
Whenever I try to import a sibling module, in the form of from . import module, I got the error No parent module -- cannot perform relative import. If things are imported from the module in the form of from .module import func, everything is fine.
From the logs I can see that the error is obtained by pycodestyle. However, I tried to run the tool from the shell, and the error is not shown.

I am using NeoVim with LanguageClient-neovim, if it could be relevant.

@allan-simon
Copy link

I got this error too.

@languitar
Copy link
Contributor

I suspect the internal call to pycodestyle strips away the remaining project context and thus this error appears.

@bbc2
Copy link

bbc2 commented Dec 2, 2019

I think it's caused by the pyls-mypy plugin. See the issue I reported there: tomv564/pyls-mypy#36.

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

No branches or pull requests

4 participants