PyCharm Plugin doesn't work with PyCharm 2022.2.2

After upgrading PyCharm from 2022.2.1 to 2022.2.2 I can’t open any Digi project.
I have downgraded PyCharm and it worked again, so it is something that changed on 2022.2.2.

The error message is:

Access is allowed from write thread only

java.util.concurrent.CompletionException: com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: EventQueue.isDispatchThread()=false
Current thread: Thread[JobScheduler FJ pool 6/9,4,main] 192179490
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1512397166
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: EventQueue.isDispatchThread()=false
Current thread: Thread[JobScheduler FJ pool 6/9,4,main] 192179490
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1512397166
at com.intellij.openapi.application.impl.ApplicationImpl.throwThreadAccessException(ApplicationImpl.java:1110)
at com.intellij.openapi.application.impl.ApplicationImpl.assertIsWriteThread(ApplicationImpl.java:1116)
at com.intellij.openapi.application.impl.ApplicationImpl.startWrite(ApplicationImpl.java:1198)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1021)
at com.jetbrains.python.facet.FacetLibraryConfigurator.attachPythonLibrary(FacetLibraryConfigurator.java:35)
at com.digi.python.facet.MicroPythonFacet.updateLibrary(MicroPythonFacet.java:67)
at com.digi.python.facet.MicroPythonFacet.initFacet(MicroPythonFacet.java:56)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleBridgeImpl.initFacets(ModuleBridgeImpl.kt:100)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleManagerBridgeImpl.loadModules(ModuleManagerBridgeImpl.kt:119)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleBridgeLoaderService.loadModules(ModuleBridgeLoaderService.kt:58)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.ModuleBridgeLoaderService.(ModuleBridgeLoaderService.kt:48)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:52)
at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:890)
at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:51)
at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:41)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:119)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:73)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:66)
at com.intellij.serviceContainer.ComponentManagerImpl.preloadService(ComponentManagerImpl.kt:1068)
at com.intellij.serviceContainer.ComponentManagerImpl$preloadServices$1.invoke(ComponentManagerImpl.kt:1033)
at com.intellij.serviceContainer.ComponentManagerImpl$preloadServices$1.run(ComponentManagerImpl.kt:55)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1375)
… 5 more

2 Likes

The Digi Plugin is set up so that on each new version of PyCharm, Digi Engineering needs to test and approve it before the Digi Plugin will work on that New version. Since the new version has just came out, it was just reported to Digi Engineering. Please allow a few days for them to test and make the necessary changes for it to work on the new version of PyCharm.

1 Like

I had this issue as well! Ended up having to create new project every time to get it to work, fairly frustrating…

There is a New version of the Plugin that is supported in the new version of PyCharm. Please update the Digi XBee Plugin to the latest version.

The new version is not available for me, I tried to restart PyCharm but still the latest version available is: Version 2.1.4 (July 2022).

I am also having the same issue. I am unable to find an installer for an earlier version of PyCharm. Is there in fact a new version of the Digi plugin available. The current one is 2.1.4

1 Like

Still getting this issue as well in PyCharm 2022.2.4 with Digi XBee 2.1.4, both are at their most recent update.

It is a real shame!

How many other plugins you have installed that break with almost every new minor version of PyCharm?

I had given up on XBee development the first time I’ve tried, because things like this are supposed to just work.
I had followed Digi’s own instructions and it didn’t work. So my guess was that the plugin was discontinued.

Only 2 years later I have tried again, and I was lucky enough to try on a small time window where the plugin was compatible with the latest version of PyCharm. Otherwise I would have given up for good this time.

At least Digi should add a big red warning in the documentation that the plugin might not work with the latest version of PyCharm.

Is there anyone from Digi in this forum?

This issue has been reported to Digi Engineering. At the moment, the fix is rolling back a version in PyCharm as this was working for the first few months without an issue.