Mypy failed with code 2
See original GitHub issueStep 1: Are you in the right place?
- I have verified there are no duplicate active or recent bugs, questions, or requests
- I have verified that I am using the latest version of the plugin.
Step 2: Describe your environment
- Plugin version:
0.14.0
- PyCharm/IDEA version:
2022.1.2 (Community Edition)
- Mypy version:
0.961
Step 3: Describe the problem:
Steps to reproduce:
- Set environment variable MYPY_CONFIG_FILE_DIR to my project directory
- mypy.ini
- click “check current file” button
The scan failed due to an exception: Mypy failed with code 2 com.leinardi.pycharm.mypy.exception.MypyToolException: Mypy failed with code 2 at com.leinardi.pycharm.mypy.mpapi.MypyRunner.runMypy(MypyRunner.java:324) at com.leinardi.pycharm.mypy.mpapi.MypyRunner.scan(MypyRunner.java:266) at com.leinardi.pycharm.mypy.checker.ScanFiles.scan(ScanFiles.java:109) at com.leinardi.pycharm.mypy.checker.ScanFiles.checkFiles(ScanFiles.java:100) at com.leinardi.pycharm.mypy.checker.ScanFiles.call(ScanFiles.java:74) at com.leinardi.pycharm.mypy.checker.ScanFiles.call(ScanFiles.java:46) at com.intellij.openapi.application.impl.ApplicationImpl$2.call(ApplicationImpl.java:326) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665) at java.base/java.lang.Thread.run(Thread.java:829)
if I set mypy_path = $MYPY_CONFIG_FILE_DIR/src
, it can run correctly, seem the Plugin not support multi paths
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5
Top GitHub Comments
Got the same issue with the same exception stack
The scan failed due to an exception: Mypy failed with code 2 com.leinardi.pycharm.mypy.exception.MypyToolException: Mypy failed with code 2 at com.leinardi.pycharm.mypy.mpapi.MypyRunner.runMypy(MypyRunner.java:324) at com.leinardi.pycharm.mypy.mpapi.MypyRunner.scan(MypyRunner.java:266) at com.leinardi.pycharm.mypy.checker.ScanFiles.scan(ScanFiles.java:109) at com.leinardi.pycharm.mypy.checker.ScanFiles.checkFiles(ScanFiles.java:100) at com.leinardi.pycharm.mypy.checker.ScanFiles.call(ScanFiles.java:74) at com.leinardi.pycharm.mypy.checker.ScanFiles.call(ScanFiles.java:46) at com.intellij.openapi.application.impl.ApplicationImpl$2.call(ApplicationImpl.java:326) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665) at java.base/java.lang.Thread.run(Thread.java:829)
The system is MacOS Catalina if it matters.
@jokance do you have a branch that could be merged?