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

Windows: Failure: executable "mypy.exe" not found #12

Closed
2 tasks done
leinardi opened this issue Sep 20, 2018 · 6 comments
Closed
2 tasks done

Windows: Failure: executable "mypy.exe" not found #12

leinardi opened this issue Sep 20, 2018 · 6 comments

Comments

@leinardi
Copy link
Owner

leinardi commented Sep 20, 2018

Step 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.10.0
  • PyCharm/IDEA version: 2018.2.2 Community
  • Mypy version: 0.630
  • OS: Windows 10

Step 3: Describe the problem:

image

When you hit the test button:

10:48 AM    Mypy Plugin: Failure: executable "H:\Miniconda3\envs\dev36\Scripts\mypy.exe" not found

From a cmd window I can prove the mypy executable exists (via installing mypy via pip) and runs:

H:\Miniconda3\envs\dev36\Scripts>.\mypy.exe
usage: mypy [-h] [-v] [-V] [more options; see below]
            [-m MODULE] [-p PACKAGE] [-c PROGRAM_TEXT] [files ...]
mypy: error: Missing target module, package, files, or command.

The above directory is on the path, and I can run mypy from any directory on a command window and it will give the same output as above.

(original issue reported on stackoverflow)

@leinardi
Copy link
Owner Author

This is mostly an OS specific issue. Currently I don't have access to a Windows machine so I am not able to debug this issue.
It would be great if someone with Windows could help me by testing some development builds, that would speed up the fixing since I should get access to a Windows machine only the next Monday.

I made a new development build where I am just logging some errors and debug info of the method isMypyPathValid(): mypy-plugin-0.10.0.zip

You should:

  1. remove the old Mypy plugin (just to be sure)
  2. install the new build (it has the same version code of the current live one)
  3. open the settings, add the path to the file "mypy.exe" and press the test button
  4. send me the idea.log file (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files)

@igiant
Copy link

igiant commented Sep 21, 2018

idea.log

leinardi added a commit that referenced this issue Sep 21, 2018
@leinardi
Copy link
Owner Author

leinardi commented Sep 21, 2018

Hi @igiant, thanks for the log file. I have a possible fix for the issue, could you please try this new build and let me know if fixes the problem? mypy-plugin-0.10.0.zip

I also tried to implement an auto-detection of mypy for Windows, if you can please check if the mypy.exe is auto-detected when you leave the relative field empty inside the plugins settings:
image

leinardi added a commit that referenced this issue Sep 21, 2018
@igiant
Copy link

igiant commented Sep 21, 2018

I deleted the previous version, then put the proposed one. When you start pycharm, an error occurs. The plugin finds the path to mypy.exe. I attach a log (installation of a plug-in and some starts pycharm)
idea.log

@leinardi
Copy link
Owner Author

Thanks for the tests, I have a new version that should fix the errors: mypy-plugin-0.10.0.zip

Beside the error messages, is the plugin working properly (both real-time and on-demand scanning)? Have you noticed anything wrong?

@igiant
Copy link

igiant commented Sep 21, 2018

all is well, this error no longer appears

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

No branches or pull requests

2 participants