mypy-pycharm icon indicating copy to clipboard operation
mypy-pycharm copied to clipboard

Traceback when opening PyCharm project

Open tim-mitchell opened this issue 7 years ago • 9 comments

Step 2: Describe your environment

  • Plugin version: 0.10.2
  • PyCharm/IDEA version: 2018.2.4
  • Mypy version: None

Step 3: Describe the problem:

Steps to reproduce:

  1. Install mypy plugin without mypy package
  2. Open another project
  • IDE Fatal Error notification.

Expected Results:

  • mypy plugin disabled

Relevant Code:

None

java.lang.Throwable: Error while detecting Mypy path: INFO: Could not find files for the given pattern(s).
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:123)
	at com.leinardi.pycharm.mypy.mpapi.MypyRunner.detectSystemMypyPath(MypyRunner.java:212)
	at com.leinardi.pycharm.mypy.mpapi.MypyRunner.getMypyPath(MypyRunner.java:146)
	at com.leinardi.pycharm.mypy.mpapi.MypyRunner.getMypyPath(MypyRunner.java:124)
	at com.leinardi.pycharm.mypy.mpapi.MypyRunner.checkMypyAvailable(MypyRunner.java:176)
	at com.leinardi.pycharm.mypy.mpapi.MypyRunner.checkMypyAvailable(MypyRunner.java:152)
	at com.leinardi.pycharm.mypy.MypyInspection.inspectFile(MypyInspection.java:76)
	at com.leinardi.pycharm.mypy.MypyInspection.lambda$checkFile$0(MypyInspection.java:65)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.call(ApplicationImpl.java:337)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)#### Observed Results:

ide error

tim-mitchell avatar Nov 08 '18 21:11 tim-mitchell

Hi @tim-mitchell, could you please attach the idea.log file (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files) after you get the Exception?

leinardi avatar Nov 09 '18 09:11 leinardi

Even better would be if it offered to install Mypy if the executable was not found.

sollyucko avatar Nov 20 '18 22:11 sollyucko

@sollyucko that feature was already implemented in version 0.10.0

leinardi avatar Nov 21 '18 12:11 leinardi

I installed it from the plug-in repo just a couple days ago and didn't see a dialog like that.

sollyucko avatar Nov 21 '18 12:11 sollyucko

This issue has been automatically marked as stale because it has not had activity in the last 60 days.

stale[bot] avatar Jan 20 '19 12:01 stale[bot]

I have the same issue. Seems also that error occurs not only on Pycharm startup, but randomly when Pycharm is running.

Pycharm version: 2018.3.4 Plugin version: 0.10.2 Mypy version: 0.670

cromat avatar Feb 20 '19 08:02 cromat

Facing the same issue. I have also linked the mypy executable, as suggested for a similar thread for pylint extension. Pylint is able to run fine post linking the executable, mypy issue persists.

I have installed mypy in a virtual env.

Screen Shot 2019-04-18 at 3 09 15 AM

Attaching the relevant idea.log relevant_idea_log.txt

Seems to be error at this line of code

I am unable to completely understand it but.. Seems like the code is trying to find the main module in the pycharm project path although the mypy is installed in another virtual env directory..

Can you please inspect?

nilayspshah avatar Apr 17 '19 22:04 nilayspshah

This issue has been automatically marked as stale because it has not had activity in the last 60 days.

stale[bot] avatar Jun 16 '19 22:06 stale[bot]