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

Exception in plugin when opening PyCharm #327

Open
marjeta42 opened this issue Mar 16, 2022 · 2 comments
Open

Exception in plugin when opening PyCharm #327

marjeta42 opened this issue Mar 16, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@marjeta42
Copy link

Describe the bug
Exception in plugin when opening PyCharm.
I have been using this plugin for a while, so I guess the problem is probably related to new project I just cloned from GitHub: learn-terraform-lambda-api-gateway

To Reproduce

  1. I opened PyCharm
  2. This opened newly cloned project https://github.com/hashicorp/learn-terraform-lambda-api-gateway.git
  3. See error

Screenshots
image

Additional context

  • Plugin Version
    • 1.25.1
  • PyCharm Version (or IDE version)
    • PyCharm 2021.3.2 (Professional Edition)
    • Build #PY-213.6777.50, built on January 27, 2022
    • Runtime version: 11.0.13+7-b1751.25 x86_64
    • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  • Python Version
    • virtual environment with python 3.8

Stacktrace

java.lang.IllegalArgumentException: Don't use '/usr/bin/python2.7' on macOS (see IDEA-271050). Args: [/JetBrains/Toolbox/apps/PyCharm-P/ch-0/213.6777.50/PyCharm.app/Contents/plugins/python/helpers/packaging_tool.py, list]
at com.intellij.execution.configurations.GeneralCommandLine.validateAndPrepareCommandLine(GeneralCommandLine.java:422)
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:352)
at com.jetbrains.python.packaging.PyPackageManagerImpl.getPythonProcessOutput(PyPackageManagerImpl.java:279)
at com.jetbrains.python.packaging.PyPackageManagerImpl.getPythonProcessResult(PyPackageManagerImpl.java:233)
at com.jetbrains.python.packaging.PyPackageManagerImpl.getPythonProcessResult(PyPackageManagerImpl.java:226)
at com.jetbrains.python.packaging.PyPackageManagerImpl.getHelperResult(PyPackageManagerImpl.java:220)
at com.jetbrains.python.packaging.PyPackageManagerImpl.getHelperResult(PyPackageManagerImpl.java:209)
at com.jetbrains.python.packaging.PyPackageManagerImpl.collectPackages(PyPackageManagerImpl.java:159)
at com.jetbrains.python.packaging.PyPackageManagerImplBase.refreshAndGetPackages(PyPackageManagerImplBase.java:209)
at security.packaging.PyPackageSecurityScan.checkPackagesInSdks(PyPackageSecurityScan.kt:47)
at security.packaging.PyPackageSecurityScan.checkPackages(PyPackageSecurityScan.kt:30)
at security.packaging.PythonPackageVulnerabilityStartupTask$runActivity$1.run(PythonPackageVulnerabilityStartupTask.kt:16)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:436)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:120)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:496)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
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)

@marjeta42 marjeta42 added the bug Something isn't working label Mar 16, 2022
@marjeta42
Copy link
Author

Actually, it seems the problem is with PyCharm.

Although it created a virtual environment, it didn't associate it with the project, so the plugin was trying to use the MacOS default, which (even though this Mac was purchased in 2021) is still 2.7...

@marjeta42 marjeta42 reopened this Mar 16, 2022
@marjeta42
Copy link
Author

Though it would be nice if plugin displayed a nice warning and ignored the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant