koxudaxi/poetry-pycharm-plugin

Exception in Poetry plugin for Pycharm

Opened this issue · 5 comments

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.

@PiedPi
Thank you for creating this issue.
I guess your error is the same below.
#175 (comment)

I have fixed the error in 1.0.6. But, Jetbrains has not published it yet.
Would you please install toml plugin?
I believe that the way fixes it.

@koxudaxi
Thank you for the fast response!

I have fixed the error in 1.0.6. But, Jetbrains has not published it yet.

Alright, let's see what happens.

Would you please install toml plugin?
I believe that the way fixes it.

You're right, this fixed it. Do I need to uninstall toml plugin when 1.0.6 arrives?

Thank you!

You're right, this fixed it. Do I need to uninstall toml plugin when 1.0.6 arrives?

@PiedPi
Great!! 🎉
I recommend keeping the toml plugin after getting 1.0.6.
Toml plugin provides syntax highlighting and syntax checker for pyproject.toml.
Also, When Pycharm has a toml plugin, the poetry plugin enable additional new features.

install extras and run scripts by clicking a line marker (Toml plugin is required)
show a message for outdated version packages (Toml plugin is required)

https://github.com/koxudaxi/poetry-pycharm-plugin#implemented

@koxudaxi
Alright, thanks for clearing that up!

OK, I have closed this issue as a duplicated issue.
Thank you.