-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Error: Item "None" of "Optional[Popen]" has no attribute "communicate" #5829
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
Comments
The type error that gets printed is genuine: mypy doesn't track information like whether a list must be non-empty, so it can't tell that the The bug here is the crash, which happens as mypy tries to print out errors from a file that it has already printed errors from. Finding the cause here will require more information about the structure of your source code and how you are invoking mypy. An obvious culprit would be if |
I see, thanks for the explanation - that makes sense. The function gets imported multiple times (but always like this: The mypy invocation isn't really special, I set the MYPYPATH, and add It's fine for me if you want to close the issue, or I can provide further information if desired. |
Could you share what you set |
I suspect this is a duplicate of #4881, where the file is getting pulled in once via the command line and once via MYPYPATH, with different module names. Probably you shouldn't need to set MYPYPATH? Do you have an |
Sure, I'm calling this from a makefile which executes So minion/src contains all python scripts (for now), including utils.py. By the way, I need Edit: Yes I have an |
OK, then closing this as a duplicate of #4881. You can open a separate issue for the feature request (if you want of course). |
@furgerf There probably shouldn't be an |
Hi, I'm trying to use mypy for a new project which triggers the following error and asks me to report it:
Python 3.5.3, mypy 0.641 installed via pip in a virtualenv.
Offending code (I've marked line 46 where the error occurs):
Hopefully this is useful to you, have a nice day :-)
The text was updated successfully, but these errors were encountered: