donkirkby/live-py-plugin

Exception in PyCharm plugin Live Coding in Python (4.9.1)

BTWS2 opened this issue · 1 comments

BTWS2 commented

What I did

Opened PyCharm.

What happened

Error message.

image

java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see com.intellij.openapi.application.Application.runReadAction())
Current thread: Thread[DefaultDispatcher-worker-57,5,main] 1366456692 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1920850545
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
	at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1004)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerBase.getDocument(FileDocumentManagerBase.java:45)
	at io.github.donkirkby.livepycharm.SplitFileEditorProvider.createEditorAsync(SplitFileEditorProvider.java:68)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileOnStartup$intellij_platform_ide_impl(FileEditorManagerImpl.kt:2000)
	at com.intellij.openapi.fileEditor.impl.UiBuilder$processFiles$2.invokeSuspend(EditorsSplitters.kt:977)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

My environment

Describe the versions of everything you were using:

  • Editor: PyCharm 2023.1
    image
  • Live Coding plugin: 4.9.1
  • Operating system: Windows 10
  • Python: 3.9

This is already fixed in #536, and I'm preparing for a new release soon.

Thanks for the bug report!