Code Monkey home page Code Monkey logo

poetry-pycharm-plugin's Introduction

Hi there ๐Ÿ‘‹,

I am a software developer who enjoys contributing to Open Source Software (OSS) with a goal to make the development environment friendlier ๐Ÿ˜„.

Here are some of the projects I've worked on:

If any of my tools have been helpful in your projects, would you consider sponsoring me? Your support would really make a difference and help me continue to maintain and improve these tools for everyone. Thank you! ๐Ÿš€

poetry-pycharm-plugin's People

Contributors

akinnear avatar dependabot-preview[bot] avatar dependabot[bot] avatar koxudaxi avatar sproshev avatar systemallica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

poetry-pycharm-plugin's Issues

Add poetry logo

PyCharm can show a log for the package manager plugin.
The places are Plugin Market and config panels of Interpreter. I attached the screenshots examples at the end of the issue.

@abn
Can we use the official poetry log in this plugin?
I couldn't find the license of the logo and the original image.
if we can't use the image then I close this issue.

Screenshot_2020-10-04_04-19-06
Screenshot_2020-10-04_04-18-38

Fails to Complete `pyproject.toml` Analysis

Describe the bug
Poetry plugin fails "Analyzing..." pyproject.toml in PyCharm Professional 2020.3.3

To Reproduce

  1. Navigate to pyproject.toml
  2. Allow plugin to do analysis.
  3. PyCharm exception window.

Expected behavior
No exception to be thrown.

Screenshots
image

Environments (please complete the following information):

  • IDE: PyCharm Professional 2020.3.3
  • OS: Ubuntu 20.10
  • Poetry Version: 1.1.4
  • Plugin version: 1.0.3

Additional context
Stacktrace:

java.lang.NoSuchMethodError: 'java.util.List org.toml.lang.psi.TomlTableHeader.getNames()'
	at com.koxudaxi.poetry.PoetryExtrasLineMarkerContributor.getInfo(PoetryExtrasLineMarkerContributor.kt:20)
	at com.intellij.execution.lineMarker.RunLineMarkerProvider.getLineMarkerInfo(RunLineMarkerProvider.java:50)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:158)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:83)
	at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:81)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:78)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:400)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:393)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:392)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:368)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:172)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:366)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

A slightly modified sample pyproject.toml:

[tool.poetry]
name = "Sample"
version = "0.1.0"
description = ""
authors = ["Cooper Pellaton <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.9"
pymongo= { version = "^3.11.2", extras = [ "srv" ] }
google-cloud-logging = "^2.0.1"
tqdm = "^4.54.0"
celery = "^5.0.2"
pandas = "^1.1.4"
Flask-RESTful = "^0.3.8"
nltk = "^3.5"
mock = "^4.0.2"
requests = "^2.25.0"
Flask = "^1.1.2"
gunicorn = "^20.0.4"
google-cloud-storage = "^1.33.0"
supervisor = "^4.2.1"
gevent = "^20.9.0"
pylint = "^2.6.0"
redis = "^3.5.3"
freezegun = "^1.0.0"
pytest = "^6.2.2"
pytest-cov = "^2.11.1"
pyspellchecker = "^0.5.6"

[tool.poetry.dev-dependencies]
autopep8 = "^1.5.4"
ipython = "^7.19.0"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q -p no:nose2pytest"
testpaths = [
    "test"
]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

Poetry Script support

Is your feature request related to a problem? Please describe.
You have to open a shell to exec poetry run script-a

Describe the solution you'd like
I would like to have pycharm to recognize [tool.poetry.scripts] as Run Configurations like NPM scripts area.

poetry lock with "--no-update"

When I edit my dependencies in pyproject.toml, I normally want to run poetry lock --no-update, rather than just poetry lock.

The plugin UI does not provide a way to do this:

Screenshot from 2020-12-30 01-01-13

Do you think it would be useful to add an option to use --no-update, when the user clicks on "poetry lock"?

Many thanks!

Updating to 2020.3 EAP downgrades poetry plugin

Describe the bug
After updating to 2020.3 EAP version 0.5 of the plugin disappears from the marketplace.

Interestingly enough, it appears that all features of 0.5 work. The package manger UI is filled correctly as is the virtualenv integration.

To Reproduce
Steps to reproduce the behavior:

  1. Install plugin on 2020.2
  2. Make version 0.5.0 a required plugin
  3. Upgrade to 2020.3 EAP
  4. See error "version 0.5 is required but 0.1.2 is installed"

Expected behavior
The correct version should be available

Screenshots
image
image

Environments (please complete the following information):

  • IDE: IntelliJ IIntelliJ IDEA 2020.3 EAP (Ultimate Edition), Build #IU-203.3645.34, built on September 21, 2020
  • OS: running in WSL (ArchLinux) on Windows 10
  • Poetry Version 1.0.10
  • Plugin version 0.5?

Exception in Poetry plugin for Pycharm

Describe the bug
Upon updating the Poetry plugin for Pycharm I get an exception:

1/2

java.lang.NoClassDefFoundError: org/toml/lang/psi/TomlTableHeader at com.koxudaxi.poetry.PoetryKt.tomlTableHeaderHasKey(poetry.kt:721) at com.koxudaxi.poetry.PoetryKt.<clinit>(poetry.kt:722) at com.koxudaxi.poetry.PoetrySdkProvider.getSdkAdditionalText(PoetrySdkProvider.kt:59) at com.jetbrains.python.sdk.PySdkRenderingKt.name(PySdkRendering.kt:31) at com.jetbrains.python.sdk.PySdkRenderingKt.name(PySdkRendering.kt:18) at com.jetbrains.python.sdk.PySdkPopupFactory$Companion.nameInPopup(PySdkPopupFactory.kt:29) at com.jetbrains.python.sdk.PySdkPopupFactory$Companion.descriptionInPopup(PySdkPopupFactory.kt:36) at com.jetbrains.python.configuration.PySdkStatusBar.getWidgetState(PySdkStatusBar.kt:75) at com.intellij.openapi.wm.impl.status.EditorBasedStatusBarPopup.lambda$update$2(EditorBasedStatusBarPopup.java:266) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.Alarm$Request.runSafely(Alarm.java:376) at com.intellij.util.Alarm$Request.run(Alarm.java:362) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:220) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:201) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:324) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47) at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:501) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) Caused by: java.lang.ClassNotFoundException: org.toml.lang.psi.TomlTableHeader PluginClassLoader[PluginDescriptor(name=Poetry, id=com.koxudaxi.poetry, path=/Users/milkman/Library/Application Support/JetBrains/PyCharmCE2020.3/plugins/poetry-pycharm-plugin, version=1.0.5)] com.intellij.ide.plugins.cl.PluginClassLoader@332806b6 at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:129) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 42 more

2/2

java.lang.NoClassDefFoundError: Could not initialize class com.koxudaxi.poetry.PoetryKt at com.koxudaxi.poetry.PoetryConfigLoader$runActivity$1.run(PoetryConfigLoader.kt:24) at com.intellij.openapi.project.DumbServiceImpl.lambda$smartInvokeLater$9(DumbServiceImpl.java:526) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:216) at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:24) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:324) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47) at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:501) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

To Reproduce
Steps to reproduce the behavior:

  1. Update Poetry 1.0.4 -> 1.0.5

Environments (please complete the following information):

  • IDE: Pycharm 2020.3.3
  • OS: macOS 10.13.6
  • Poetry Version 1.1.4
  • Plugin version 1.0.5

Additional context
I'm a noob so can't provide more info because I'm not sure what else to provide/how to provide it.

No reaction starting a new project

Describe the bug
Start pycharm click to add a new project nothing happens.
Same is behaviour in Linux and Windows.
Poetry is currently the only plugin.

Screenshots
image

Environments (please complete the following information):

  • IDE: PyCharm Community 2020.3.3-1
  • OS: ArchLinux or Windows 10
  • Poetry Version 1.1.4
  • Plugin version 1.0.5

Create poetry environment when starting a new project

When creating new project, there are only three options to create new environment:

  • Virtualenv
  • Pipenv
  • Conda

Is it possible to add Poetry in this list or it would require additional API on PyCharm side?

image

Temporary workaround

Create project with existing python interpreter and then create poetry environment

Repair of Broken Env

It is possible to get into an repairable state if the current interpreter is deleted. I found this while trying out the plugin and deciding to switch from in-project to not in-project.

Steps to reproduce:

  1. Configure poetry to use an in-project environment.
poetry config virtualenvs.in-project true
  1. Create interpreter using the plugin pointing to a pyenv base interpreter (e.g. ~/.pyenv/versions/3.6.10/bin/python).
  2. Delete the in project environment.
rm -r .venv
  1. Configure poetry to not use an in project environment.
poetry config --unset virtualenvs.in-project
  1. Try to recreate the environment using the plugin. The current environment is listed as invalid. However, the add python interpreter dialogue reads "Poetery (sic) interpreter has been already added, select ." Therefore, there is no way out of this state.

Wrong warning: Package containing module is not listed in project requirements

I noticed that with PyCharm 2020.2.3 and the poetry plugin 0.53 I get warnings that packages are not listed in the requirements.
For example a very simple environment where I just installed selenium:

โฏ poetry update
Creating virtualenv ... /.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (0.1s)


Package operations: 2 installs, 0 updates, 0 removals

  - Installing urllib3 (1.25.10)
  - Installing selenium (3.141.0)

Gives me the warning:
image

I even added a requirements.txt but that did not help. If I switch to a non poetry interpreter like the System Interpreter the warning vanishes.
I really don't like warning and even more I don't like to add comments just to silence them. Is this a known bug or something specific to my environment?

Kind regards,
Alex

WSL python support

Support building poetry environments with WSL.

I am guessing that this would require remote interpreter support by design.

Version 0.1 [minimum features] Release

Version 0.1 should support minimum features without extension points.

I would cover the common use-case in this version.

TODO

  • freeze a list of features
  • documentation
  • improve contribution guideline
  • test for common use-case

Features

  • add a new/existing poetry environment as an interpreter
  • install packages with pyproject.toml when adding an interpreter
  • add a new pyproject.toml when it does not exists
  • install and import a package with poetry (QuickFix)
  • install packages from poetry.lock
  • update and lock with a popup
  • show a message and a link to fix settings (QuickFix)
  • install extras by clicking a line marker (Toml plugin is required)

Test

use-cases

  • add new poetry Interpreter with install packages from pyproject.toml
  • add new poetry Interpreter without install packages from pyproject.toml
  • add new poetry interpreter from existing enviroment
  • lock file from a popup after changing pyproject.toml
  • update file from a popup after changing pyproject.toml
  • install new packages from a notification after lock file is updated
  • install packages from action of installation (alt+enter)

Support for pydantic-like models?

Hi, I'm using your plugin for quite some time and it's awesome - thanks for your work! :)

I'm developing ormar - a mini async orm with fastapi in mind, that uses pydantic for validation (https://github.com/collerek/ormar)

I'm subclassing the pydanic.BaseModel as my ormar.Model and hacking around with pydantic internals to make it work.
(You can ignore Meta class below, the field definition is like in pydantic but I use my custom fields classes as type hints - id and name in example).

image
It does kind of work, but in example above it shows Base clases of my fields, and I would like to display user=User(id: Integer, name: String), or even better -> user=User(id:int, name:str)

I'm already playing with __annotations__, pydantic fields shape, type_ and a lot of internals, so I would like to adjust my models/ fields to play well with your plugin.

But for that I need information from where do you grab the information to display in code completion, hints etc.

I'm also exposing QuerySet operations like User.objects.create(**kwargs) or User.objects.update(**kwargs) that as kwargs should accept only pydantic/ormar fields -> can you somehow register a custom function to be picked up by your plugin, or make it work in other way (so display hints like in __init__()).

I tried looking into your code but saw a huge number of jetbeans dependencies and I don't even know kotlin :D

So would be really grateful for info how I can adjust my project to be more in line with your plugin, as I find it super useful.

Thanks in advance and sorry for the long text.

Python version dependency in pyproject.toml breaks poetry for modified Python versions

Describe the bug
Trying to create a new interpreter on Debian with python3.9 generates invalid pyproject.toml

To Reproduce
Steps to reproduce the behavior:

  1. Install python3.9 on Debian.
  2. Try to generate a virtualenv based on that
  3. Error:
ParseConstraintError

  Could not parse version constraint: ^3.9.1+

  at ~/.poetry/lib/poetry/_vendor/py3.6/poetry/core/semver/__init__.py:164 in parse_single_constraint
      160โ”‚         else:
      161โ”‚             return version
      162โ”‚ 
      163โ”‚     raise ParseConstraintError(
    โ†’ 164โ”‚         "Could not parse version constraint: {}".format(constraint)
      165โ”‚     )
      166โ”‚ 

This is because the version of the Debian Python is 3.9.1+ and that gets put in the deps:

[tool.poetry.dependencies]
python = "^3.9.1+"

Expected behavior
poetry init suggests ^3.9, that's probably a more sensible value.

Environments (please complete the following information):
Python 3.9 is only available on testing/sid, but it should still work.

Creating new project interpreter does not work on windows

Attempting to add a new project interpreter it goes through the motions then gives the error "Directory C:\Users\XXX\AppData\Local\pypoetry\Cache\virtualenvs\sample-poetry-app-FpOpy9hG-py3.8
\bin\python not found".

The environment does get created but the path to python instead is:
C:\Users\XXX\AppData\Local\pypoetry\Cache\virtualenvs\sample-poetry-app-FpOpy9hG-py3.8\Scripts\python.exe

Python bases attempted: 3.8.3 and 3.7.3
poetry version: 1.0.6
OS: Windows 10
PyCharm: 2020.1.2 Profession Edition

Support remote host

PyCharm doesn't support creating an environment for the remote hosts with the third-party plugin.
We need the feature when creating an environment like docker, WSL.

PyCharm team will support the feature.

Related Issues

#106
#151
#58

Version 0.5 [extension points partial compatible] Relase

Version 0.5 should support extension points on PyCharm 2020.2.2.

I would implement two classes for extension points.

  • PySdkProvider
  • PyPackageManagerProvider

Poetry Version

Poetry version 1.1.0b3

Related Issues

python-poetry/poetry#2711

TODO

  • implemention
  • test
  • documentation

Implemention

  • PySdkProvider
  • PyPackageManagerProvider

Test

use-cases

  • add new poetry Interpreter with install packages from pyproject.toml
  • add new poetry Interpreter without install packages from pyproject.toml
  • add new poetry interpreter without existing environment
  • add new poetry interpreter from the existing environment
  • lock file from a popup after changing pyproject.toml
  • update file from a popup after changing pyproject.toml
  • install new packages from a notification after the lock file is updated
  • install packages from action of installation (alt+enter)
  • run scripts
  • install/uninstall packages from settings (GUI)
  • open project that is created by old version poetry plugin.

Recognize existing environments from existing projects?

Hi! Loving the plugin! Thanks for taking the effort to build it.

I would like to suggest that a differentiation can be made between creating a new or adding an existing environment, so that we can register poetry environments that were created prior to installing the plugin, in the same manner you can do that with a Conda or Virtualenv environment.

error when adding interpreter

I am trying to install a new interpreter in pycharm with this plugin on windows 10 home with pycharm 2020.1. I am missing fields that you show in your screenshot and I get an error when trying to point to poetry.bat.

image

Support installing extras packages

This plugin install packages which are only dependencies or dev-dependencies
But, a general project has extras packages.
I want to install it with an install button on the editor(like run/debug button)

1.0.3: failure on creating environment via python3 version not from PATH

Describe the bug
Plugin uses python3 path from PATH not from 'create poetry dialog' and could fail on multiple Python3 version installed.

To Reproduce
Steps to reproduce the behavior:

  1. macos
  2. have three versions of Python3 installed on machine: 3.6, 3.7, 3.8 with 3.7 as default:
$ which python3
/usr/local/bin/python3

$ /usr/local/bin/python3 -V
Python 3.7.9

$ which -a python3
/usr/local/bin/python3
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
  1. install poetry on every Python3 version via 'path/../python3 -m pip install poetry==1.1.4'
  2. open project with python version required as "^3.8" in Pycharm 2020.3.3 with Poetry plugin v1.0.3

Expected behavior
created poetry environment

Screenshots
2021-02-03_05-20-35
2021-02-03_05-21-26
If applicable, add screenshots to help explain your problem.

Environments (please complete the following information):
Already done above.
It might be helpful to move this section to the top of the form.

Additional context
Full text from error window:

executed command

/Library/Frameworks/Python.framework/Versions/3.8/bin/poetry env use /usr/local/bin/python3


  NoCompatiblePythonVersionFound

  The specified Python version (3.7.9) is not supported by the project (^3.8).
  Please choose a compatible version or loosen the python constraint specified in the pyproject.toml file.

  at /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/poetry/utils/env.py:675 in create_venv
       671โ”‚             # If an executable has been specified, we stop there
       672โ”‚             # and notify the user of the incompatibility.
       673โ”‚             # Otherwise, we try to find a compatible Python version.
       674โ”‚             if executable:
    โ†’  675โ”‚                 raise NoCompatiblePythonVersionFound(
       676โ”‚                     self._poetry.package.python_versions, python_patch
       677โ”‚                 )
       678โ”‚ 
       679โ”‚             io.write_line(

Virtualenv gets deleted when I enable Poetry plugin

Describe the bug

Whenever I start IDEA with the Poetry plugin enabled, it starts indexing the virtualenv and within seconds the whole $VIRTUAL_ENV directory gets completely removed. No new virtualenv is created in its place. This only occurs in one project though.

  1. IDEA complains "Invalid Python interpreter selected for the module".
  2. I restore the virtualenv from backup
  3. When I click on the "Configure Python Interpreter" on IDEA's notification, immediately it starts deleting files, which takes a few seconds until completely removed.
  4. Go to 1

This started occurring in within the last week, I performed a 'brew update' and update to IDEA plugins. Until then I had been using the Poetry plugin without issues.

Disabling the Poetry plugin solves this issue.

I am not sure how to debug this further, nothing relevant appears in idea.log file. Is it possible to log all commands that the Poetry plugin invokes?

Environments (please complete the following information):

  • IDE: IntelliJ IDEA 2020.3.1 (Ultimate Edition)
  • OS: macOS 10.15.7
  • Poetry Version 1.1.4
  • Plugin version 1.0.1

Poetry plugin prevents inspections to be visible in settings

Describe the bug
No inspections are visible in the settings window, we are presented with a blank page.
Disabling or removing the plugin fixes the problem.

Screenshots
2020-09-26

To Reproduce
Open Settings -> Editor -> Inspections

Expected behavior
Inspections settings should be visible.

Environments:

  • IDE: PyCharm Professional 2020.2.2
  • OS: Microsoft Windows 10 [Version 10.0.19041.508]
  • Poetry version: 1.0.10
  • Plugin version: 0.5.1

java.util.MissingResourceException: Can't find bundle for base name messages.PoetryPsiBundle

To Reproduce
Steps to reproduce the behavior:

  1. Start PyCharm with a project opened
  2. Wait for the IDE to initialise
  3. Observe the red exclamation mark error in the right corner of the status bar, the exception is:
java.util.MissingResourceException: Can't find bundle for base name messages.PoetryPsiBundle, locale ru_RU
	at java.base/java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2055)
	at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1689)
	at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1593)
	at java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:1284)
	at com.intellij.AbstractBundle.getResourceBundle(AbstractBundle.java:156)
	at com.intellij.AbstractBundle.getResourceBundle(AbstractBundle.java:143)
	at com.intellij.codeInspection.InspectionEP.getLocalizedString(InspectionEP.java:200)
	at com.intellij.codeInspection.InspectionEP.getGroupDisplayName(InspectionEP.java:61)
	at com.intellij.codeInspection.InspectionEP.getGroupPath(InspectionEP.java:132)
	at com.intellij.codeInspection.ex.InspectionToolWrapper.getGroupPath(InspectionToolWrapper.java:156)
	at com.intellij.codeInspection.ex.InspectionSearchableOptionContributor.processOptions(InspectionSearchableOptionContributor.java:40)
	at com.intellij.ide.ui.search.SearchableOptionsRegistrarImpl.lambda$initialize$1(SearchableOptionsRegistrarImpl.java:131)
	at com.intellij.openapi.extensions.impl.ExtensionProcessingHelper.forEachExtensionSafe(ExtensionProcessingHelper.java:33)
	at com.intellij.openapi.extensions.ExtensionPointName.forEachExtensionSafe(ExtensionPointName.java:49)
	at com.intellij.ide.ui.search.SearchableOptionsRegistrarImpl.initialize(SearchableOptionsRegistrarImpl.java:131)
	at com.intellij.openapi.options.newEditor.SettingsFilter.lambda$new$1(SettingsFilter.java:53)
	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:834)

Environments (please complete the following information):

  • IDE: PyCharm Pro 2020.3 EAP 1
  • Plugin version: 0.5.1

Additional context

It seems there is an unresolved reference to this bundle in:

<localInspection language="TOML" enabledByDefault="true" implementationClass="com.koxudaxi.poetry.PoetryVersionInspection" displayName="Poetry Package versions" bundle="messages.PoetryPsiBundle" groupKey="INSP.GROUP.python" suppressId="PoetryPackageVersion"/>

Release roadmap

Release schedule

Version release issue detail code status target date
0.0.x experimental phase released
0.1 #55 minimum features released 2020/07/27
0.5 #109 minimum features released 2020/09/22
1.0 #56 extension points compatible released 2020/12/11
1.1 #182 support EAP 211 pushed (waiting for approval by Jetbrains) 2021/02/xx
1.5 support remote host #152 2021/xx/xx

v1.0.5 Exception

Describe the bug
v1.0.5 Kills the run/debug configuration pane in Intellij

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Run -> Edit Configurations...'
  2. Click on an existing python configuration
  3. Configuration Pane on the right handside of the window is blank
  4. Click on the "+" button, click on the Python option - nothing happens

Expected behaviour
I should be able to edit an existing python run/debug configs or, create new ones

Screenshots
image

Environments (please complete the following information):

  • IDE: Intellij Ultimate 2020.3.2
  • OS: Kubuntu 20.04
  • Poetry Version : 1.1.4
  • Plugin version 1.0.5

Additional context
The IDE reported the following exception from the plugin:

Stacktrace
com.intellij.diagnostic.PluginException: Cannot create class com.koxudaxi.poetry.PyProjectTomlWatcher [Plugin: com.koxudaxi.poetry]
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:725)
	at com.intellij.openapi.extensions.impl.ExtensionComponentAdapter.instantiateClass(ExtensionComponentAdapter.java:51)
	at com.intellij.openapi.extensions.impl.XmlExtensionAdapter$SimpleConstructorInjectionAdapter.instantiateClass(XmlExtensionAdapter.java:133)
	at com.intellij.openapi.extensions.impl.ExtensionComponentAdapter.createInstance(ExtensionComponentAdapter.java:43)
	at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.createInstance(XmlExtensionAdapter.java:69)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapter(ExtensionPointImpl.java:472)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl.access$200(ExtensionPointImpl.java:37)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl$1.next(ExtensionPointImpl.java:367)
	at com.intellij.openapi.extensions.impl.ExtensionProcessingHelper.forEachExtensionSafe(ExtensionProcessingHelper.java:27)
	at com.intellij.openapi.extensions.ExtensionPointName.forEachExtensionSafe(ExtensionPointName.java:49)
	at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:203)
	at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:157)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.createEditor(TextEditorComponent.java:133)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.<init>(TextEditorComponent.java:79)
	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.<init>(PsiAwareTextEditorImpl.java:107)
	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.createEditorComponent(PsiAwareTextEditorImpl.java:85)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.<init>(TextEditorImpl.java:52)
	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.<init>(PsiAwareTextEditorImpl.java:36)
	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorProvider.createEditor(PsiAwareTextEditorProvider.java:31)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4Edt(FileEditorManagerImpl.java:891)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$openFileImpl4$17(FileEditorManagerImpl.java:860)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.runBulkTabChange(FileEditorManagerImpl.java:1680)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$openFileImpl4$18(FileEditorManagerImpl.java:859)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:216)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:24)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeAndWait$8(ApplicationImpl.java:476)
	at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:126)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:501)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:684)
	... 52 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.koxudaxi.poetry.PoetryKt
	at com.koxudaxi.poetry.PyProjectTomlWatcher.<init>(poetry.kt:430)
	... 57 more

Document features

add documents include screen captures (GIF animation) on each feature

Version 1.0 [extension points compatible] Relase

Version 1.0 should support the same features as other Python Interpreter(example: pipenv) with extension points.

This issue would be updated after version 0.1 is released.

TODO

  • freeze a list of features
  • impliment required functions for extension points
  • test

Features

Plugin Poetry v0.5.2 is incompatible with last version of IntelliJ

Describe the bug
The Poetry plugin v0.5.2 does not appear on the IntelliJ marketplace. v0.1.3 does appear.

I tried to install it manually and IntelliJ threw the next error:

Plugin 'Poetry' version 0.5.2 is incompatible with this installation: since build 202.7319.64 > IU-202.7319.50

To Reproduce
Steps to reproduce the behavior:

  1. Using IntelliJ 2020.2.2, build 202.7319.50
  2. Download Poetry 0.5.2
  3. Go to Plugins > โ‹ฎ > Install plugin from disk
  4. Select poetry plugin
  5. See error

Expected behavior

  1. The last version of the plugin should show up in the maketplace. It doesn't.
  2. Should be able to install the last version manually.

Screenshots
demo

Environments (please complete the following information):

  • IDE: IntelliJ 2020.2.2, build 202.7319.50
  • OS: Windows 10 v2004
  • Poetry Version 1.1.0
  • Plugin version 0.5.2

Show Python Version in Interpreter Name

Is your feature request related to a problem? Please describe.
I cannot tell which interpreter to use for a given version of python. Because the version appears at the end of the string for poetry interpreters and pycharm uses the beginning of the string, the interpreter names end up being something like this.

Poetry (project-name)
Poetry (project-name) (2)
Poetry (project-name) (3)

Describe the solution you'd like
I would like the auto-generated name of the environment to include the python version.

Desired outcome would be something like the following.
Poetry (project-name-3.6)
Poetry (project-name-3.7)
Poetry (project-name-3.8)

Describe alternatives you've considered
Manually editing the name after interpreter creation is not easy using the pycharm UI because it shows all interpreters for all projects in the same form. I cannot set the interpreter name at the time of creation.

Additional context
I am using poetry with pyenv on a linux machine.

extension points

We must list the extension points that will implement.

Extension points

Error creating a new project

Describe the bug
When I try to create a new flask project with poetry as its enviroment I get the following error.
Running the command myself in my user directory I get this error:
[RuntimeError] Poetry could not find a pyproject.toml file in C:\Users\Max or its parents
I assume PyCharm is not setting the working directory correctly when running the command

Environments (please complete the following information):

  • IDE: PyCharm 2020.2.3 (Professional Edition) Build #PY-202.7660.27, built on October 6, 2020
  • OS: Windows 10
  • Poetry Version 1.0.10
  • Plugin version 0.5.3

Wrong system interpreter icon in settings

Describe the bug
System interpreter icon is wrong. System interpreter is shown with virtualenv-like icon (i.e. python logo with V) instead of system icon (plain python logo).

To Reproduce
Steps to reproduce the behavior:

  1. Go to Interpreter Settings
  2. Add a System Interpreter
  3. Open Interpreter settings again and notice System Interpreter icon

Expected behavior
A system interpreter should have a plain python icon, not a virtualenv-like icon (see screenshots below). First screenshot is without the plugin and second screenshot (with the wrong icon) is with the plugin.

Screenshots
icon1
Correct system interpreter icon (plugin disabled)

icon2
Wrong system interpreter icon (plugin enabled)

Environments (please complete the following information):

  • IDE: PyCharm Professional 2020.2.3
  • OS: Microsoft Windows 10 [Version 10.0.19041.508]
  • Poetry version: 1.1.2
  • Plugin version: 0.5.3

Marked is incompatible for PyCharm EAP while compatible

Describe the bug
Marked is incompatible for PyCharm EAP while compatible

To Reproduce
Steps to reproduce the behavior:

  1. Install pycharm EAP
  2. Install plugin manually (the marketplace will only install 1.0.3 which is broken)
  3. Restart pycharm

Expected behavior
Plugin to work without extra steps

Environments (please complete the following information):

  • IDE: PyCharm Professional 2021.1 (211.4961.30)
  • OS: Windows 10 20H2
  • Poetry Version: 1.1.4
  • Plugin version: 1.0.6

Additional context
Work around is to bump the version up in the plugin.xml file in the installed plugin

Having an unrestricted version available on GitHub would also be appreciated if you want to keep the restriction in the marketplace version

Unable to create venv via plugin.

Describe the bug
I am trying to create new venv via poetry and getting this error

Installing dependencies from lock file

PackageInfoError

Unable to determine package info for path: /tmp/pypoetry-git-rembg-forkwsEl10

Fallback egg_info generation failed.

Command ['/tmp/tmp_ogNPR/.venv/bin/python', 'setup.py', 'egg_info'] errored with the following return code 1, and output: 
Traceback (most recent call last):
  File "setup.py", line 1, in <module>
    import pathlib
ImportError: No module named pathlib

/home/sapiosexual/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)

Python 2.7 will no longer be supported in the next feature release of Poetry (1.2).
You should consider updating your Python version to a supported one.

Note that you will still be able to manage Python 2.7 projects by using the env command.
See https://python-poetry.org/docs/managing-environments/ for more information.

I am perfectly sure I have installed poetry for python3. I am using Python3.8 as base interpreter. I am able to create new venv using terminal.

To Reproduce
Steps to reproduce the behavior:

  1. Go to settings ctrl + alt + s.
  2. Click on Project
  3. Click on Project Interpreter
  4. Click on gear wheel
  5. Click on Add
  6. Click on Poetry Environment
  7. Choose Location and base interpreter
  8. Click on Ok
  9. See error

Expected behavior
Brand new venv with installed dependencies.

Environments (please complete the following information):

  • IDE: PyCharm 2020.3 (Professional Edition)
    Build #PY-203.5981.165, built on December 18, 2020
    Runtime version: 11.0.9+11-b1145.21 amd64
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
    Linux 5.4.0-58-generic
  • OS: Ubuntu Ubuntu 20.04.1 LTS
  • Poetry Version 1.1.4
  • Plugin version 1.0.1

Project dependency detection via pyproject.toml

So, say I have the following folder structure:

root/
    library/
        poetry.lock
        pyproject.toml
    dependency/
       poetry.lock
       pyproject.toml

I would attach root/library and root/dependency as individual Pycharm projects - each with their own Poetry environments.

However, these projects can also depend on each other:

#root/library/pyproject.toml
...

[tool.poetry.dependencies]
dependency = {path = "../dependency", develop = true}

While this all works pretty well, I still need to go into Preferences -> Project -> Project Dependencies and specify how these projects depend on one another manually. Is it possible for the Poetry plugin to detect these dependencies and automatically configure the Preferences -> Project -> Project Dependencies panel accordingly?

If it's possible (I'm unfamiliar with the Pycharm plugin APIs and would have to look around) and there's interest, I'd love to contribute a PR to support this as it'd be really useful in my opinion.

Version 1.0.4 throws NoSuchMethodError for TomlTableHeader.getKey()

Describe the bug
Every time I touch the pyproject.toml file (open it or modify a package version) I get the following exception:

java.lang.NoSuchMethodError: 'org.toml.lang.psi.TomlKey org.toml.lang.psi.TomlTableHeader.getKey()' at com.koxudaxi.poetry.PoetryExtrasLineMarkerContributor.getInfo(PoetryExtrasLineMarkerContributor.kt:20) at com.intellij.execution.lineMarker.RunLineMarkerProvider.getLineMarkerInfo(RunLineMarkerProvider.java:50) at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:158) at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:83) at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:81) at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:78) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:400) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:393) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:392) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:368) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:172) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:366) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

Environments (please complete the following information):

  • IDE: PyCharm Community 2020.3.3
  • OS: macOS 11.2
  • Poetry Version 1.1.4
  • Plugin version 1.0.4

"Failed To Create Interpreter" on Windows

When trying to add a Poetry Environment python interpreter, I'm getting the following error:

Cannot run program "C:\Users\israel.tsadok\.poetry\bin\poetry" (in directory "C:\Users\israel.tsadok\code\test\poet"): CreateProcess error=193, %1 is not a valid Win32 application

To Reproduce

On Windows:

  1. Click the python interpreter button on the bottom right corner of PyCharm
  2. Click "Add Interpreter..."
  3. Choose "Poetry Environment" on the left-hand side
  4. Choose "Python 3.9" as base environment
  5. Click OK

Environment:

  • IDE: PyCharm Community 2020.3
  • OS: Windows 10 (Build 20279.1)
  • Poetry Version: 1.1.4
  • Plugin version: 1.0.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.