donkirkby / live-py-plugin

Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser
https://donkirkby.github.io/live-py-plugin
MIT License
290 stars 57 forks source link

Exception in PyCharm plugin Live Coding in Python (4.9.1) #537

Closed BTWS2 closed 1 year ago

BTWS2 commented 1 year ago

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:

donkirkby commented 1 year ago

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

Thanks for the bug report!