Autocompletion broke with last update

已回答

Hi! One of the latest updates to pycharm broke almost completely a couple of crucial features.
Code completion is gone: as I start typing something it would open a dropdown with possible names and methods, now it's gone.
Ctrl+B or Ctrl+LMB for navigating to the implementation/usages of a method also don't work anymore.


I'm on:

```
PyCharm 2024.2.1 (Community Edition)
Build #PC-242.21829.153, built on August 29, 2024
Runtime version: 21.0.3+13-b509.11 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.8.0-40-generic
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4048M
Cores: 16
Registry:
 debugger.new.tool.window.layout=true
 ide.experimental.ui=true
 i18n.locale=
Non-Bundled Plugins:
 com.jetbrains.plugins.ini4idea (242.20224.361)
 some.awesome (1.15)
 cn.haojiyou.CodeGlance3 (2.1.1-2021.1.3)
 com.markskelton.one-dark-theme (5.11.0)
 com.github.ArtsiomCh.NestedBracketsColorer (0.7.1)
Current Desktop: ubuntu:GNOME
```

0

Just restarted pycharm and got this error:

```
java.lang.RuntimeException: Broken stub format, most likely version of FILE (python.FILE) was not updated after serialization changes

    at com.intellij.psi.stubs.LazyStubList.instantiateStub(LazyStubList.java:94)
    at com.intellij.psi.stubs.LazyStubList.get(LazyStubList.java:57)
    at com.intellij.psi.stubs.LazyStubList.get(LazyStubList.java:17)
    at com.intellij.psi.stubs.StubList$1.get(StubList.java:155)
    at com.intellij.psi.stubs.StubList$1.get(StubList.java:151)
    at java.base/java.util.AbstractList$Itr.next(AbstractList.java:373)
    at com.jetbrains.python.psi.impl.PyPsiUtils.collectStubChildren(PyPsiUtils.java:418)
    at com.jetbrains.python.psi.impl.PyFileImpl.getImportTargets(PyFileImpl.java:488)
    at com.intellij.python.community.impl.huggingFace.service.HuggingFaceLibraryImportChecker.isAnyHFLibraryImportedInFile(HuggingFaceImportedLibrariesManager.kt:106)
    at com.intellij.python.community.impl.huggingFace.service.HuggingFaceLibraryImportChecker.isAnyHFLibraryImportedInProject$lambda$0(HuggingFaceImportedLibrariesManager.kt:97)
    at com.intellij.openapi.roots.impl.FileIndexBase.lambda$toContentIteratorEx$1(FileIndexBase.java:48)
    at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl$processContentFilesRecursively$visitor$1.visitFileEx(WorkspaceFileIndexImpl.kt:157)
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:302)
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:334)
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:334)
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:334)
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:334)
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:334)
    at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.processContentFilesRecursively(WorkspaceFileIndexImpl.kt:166)
    at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.processContentFilesRecursively(WorkspaceFileIndexImpl.kt:125)
    at com.intellij.openapi.roots.impl.FileIndexBase.iterateContentUnderDirectory(FileIndexBase.java:41)
    at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.iterateContentUnderDirectory(ProjectFileIndexImpl.java:30)
    at com.intellij.openapi.roots.impl.FileIndexBase.iterateProvidedRootsOfContent(FileIndexBase.java:58)
    at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.iterateContent(ProjectFileIndexImpl.java:62)
    at com.intellij.openapi.roots.impl.FileIndexBase.iterateContent(FileIndexBase.java:33)
    at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.iterateContent(ProjectFileIndexImpl.java:30)
    at com.intellij.python.community.impl.huggingFace.service.HuggingFaceLibraryImportChecker.isAnyHFLibraryImportedInProject(HuggingFaceImportedLibrariesManager.kt:94)
    at com.intellij.python.community.impl.huggingFace.service.HuggingFaceImportedLibrariesManager.checkLibraryImportStatusInProject(HuggingFaceImportedLibrariesManager.kt:61)
    at com.intellij.python.community.impl.huggingFace.service.HuggingFaceImportedLibrariesManager.isLibraryImported(HuggingFaceImportedLibrariesManager.kt:47)
    at com.intellij.python.community.impl.huggingFace.service.HuggingFacePluginManager.isActive(HuggingFacePluginManager.kt:17)
    at com.intellij.python.community.impl.huggingFace.annotation.HuggingFaceEntityNameAnnotator.annotate(HuggingFaceEntityNameAnnotator.kt:23)
    at com.intellij.codeInsight.daemon.impl.AnnotationHolderImpl.runAnnotatorWithContext(AnnotationHolderImpl.java:216)
    at com.intellij.codeInsight.daemon.impl.AnnotatorRunner.lambda$runAnnotator$3(AnnotatorRunner.java:139)
    at com.intellij.codeInsight.daemon.impl.AnnotationSessionImpl.computeWithSession(AnnotationSessionImpl.java:80)
    at com.intellij.codeInsight.daemon.impl.AnnotatorRunner.runAnnotator(AnnotatorRunner.java:129)
    at com.intellij.codeInsight.daemon.impl.AnnotatorRunner.lambda$runAnnotatorsAsync$0(AnnotatorRunner.java:66)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:279)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
    at com.intellij.codeInsight.daemon.impl.AnnotatorRunner.lambda$runAnnotatorsAsync$1(AnnotatorRunner.java:66)
    at com.intellij.concurrency.JobLauncherImpl$2MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:494)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:684)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
    at com.intellij.concurrency.JobLauncherImpl$2MyProcessQueueTask.call(JobLauncherImpl.java:483)
    at com.intellij.concurrency.JobLauncherImpl$2MyProcessQueueTask.call(JobLauncherImpl.java:471)
    at com.intellij.concurrency.JobLauncherImpl$2.compute(JobLauncherImpl.java:456)
    at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:759)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
    at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:676)
    at com.intellij.concurrency.JobLauncherImpl.procInOrderAsync(JobLauncherImpl.java:554)
    at com.intellij.codeInsight.daemon.impl.AnnotatorRunner.runAnnotatorsAsync(AnnotatorRunner.java:67)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:228)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectInformationWithProgress$10(GeneralHighlightingPass.java:174)
    at com.intellij.codeInsight.daemon.impl.HighlightVisitorRunner.createHighlightVisitorsFor(HighlightVisitorRunner.java:84)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:107)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:418)
    at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.runWithSpanIgnoreThrows(trace.kt:118)
    at com.intellij.platform.diagnostic.telemetry.helpers.TraceUtil.runWithSpanThrows(TraceUtil.java:36)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$3(PassExecutorService.java:413)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$4(PassExecutorService.java:404)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:403)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:379)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.cacheFileTypesInside(FileTypeManagerImpl.java:802)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$1(PassExecutorService.java:379)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.executeByImpatientReader(AnyThreadWriteThreadingSupport.kt:486)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:377)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:190)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.io.EOFException
    at java.base/java.io.DataInputStream.readUnsignedByte(DataInputStream.java:297)
    at com.intellij.openapi.util.io.DataInputOutputUtilRt.readINT(DataInputOutputUtilRt.java:19)
    at com.intellij.util.io.DataInputOutputUtil.readINT(DataInputOutputUtil.java:23)
    at com.intellij.util.io.StringRef.stringFromStream(StringRef.java:102)
    at com.intellij.psi.stubs.StubInputStream.readNameString(StubInputStream.java:34)
    at com.jetbrains.python.psi.impl.stubs.PyTypedDictStubImpl$Companion.deserializeFields(PyTypedDictStubImpl.kt:112)
    at com.jetbrains.python.psi.impl.stubs.PyTypedDictStubImpl$Companion.deserialize(PyTypedDictStubImpl.kt:86)
    at com.jetbrains.python.psi.impl.stubs.PyTypedDictStubType.deserializeStub(PyTypedDictStubType.kt:18)
    at com.jetbrains.python.psi.impl.stubs.PyTypedDictStubType.deserializeStub(PyTypedDictStubType.kt:10)
    at com.jetbrains.python.psi.impl.stubs.PyCustomizableStubElementType.deserializeCustomStub(PyCustomizableStubElementType.java:44)
    at com.jetbrains.python.psi.impl.stubs.PyTargetExpressionElementType.deserialize(PyTargetExpressionElementType.java:117)
    at com.jetbrains.python.psi.impl.stubs.PyTargetExpressionElementType.deserialize(PyTargetExpressionElementType.java:30)
    at com.intellij.psi.stubs.LazyStubData.deserializeStub(LazyStubList.java:129)
    at com.intellij.psi.stubs.LazyStubList.instantiateStub(LazyStubList.java:86)
    ... 82 more
```

0

invalidate caches -→ restart seems to have fixed some of it for now

0

Glad to know it's fixed. Let us know if it happens in the next minor update. 

0

I did run into a similar issue for Java and IntelliJ. Autocompletion stopped working completely after I updated to 2024.2.1. Neither symbols in the local projects, nor symbols like Integer and its methods were found by the autocompletion. However, “Go To Declaration” still worked. I noticed the following exception from the Java plugin, which seems to have been caused by an exception in an implementation of the extension point com.intellij.codeInsight.NullableNotNullManager. The implementation came from one of our internal plugins which isn't compatible with 2024.2.1 yet. Deactivating the plugin seems to have resolved the issue for now.

com.intellij.diagnostic.PluginException: Cannot create extension (class=com.intellij.codeInsight.DefaultInferredAnnotationProvider) [Plugin: com.intellij.java]
	at com.intellij.serviceContainer.ComponentManagerImpl.createError(ComponentManagerImpl.kt:980)
	at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.doCreateInstance(XmlExtensionAdapter.kt:73)
	at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.createInstance(XmlExtensionAdapter.kt:33)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapter(ExtensionPointImpl.kt:403)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl.createExtensionInstances(ExtensionPointImpl.kt:376)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl.getExtensionList(ExtensionPointImpl.kt:222)
	at com.intellij.openapi.extensions.ExtensionPointName.getExtensionList(ExtensionPointName.kt:94)
	at com.intellij.codeInsight.InferredAnnotationsManagerImpl.findInferredAnnotation(InferredAnnotationsManagerImpl.java:25)
	at com.intellij.codeInsight.AnnotationUtil.lambda$static$2(AnnotationUtil.java:145)
	at com.intellij.util.containers.ConcurrentFactoryMap$2.create(ConcurrentFactoryMap.java:174)
	at com.intellij.util.containers.ConcurrentFactoryMap.get(ConcurrentFactoryMap.java:40)
	at com.intellij.codeInsight.AnnotationUtil.findNonCodeAnnotations(AnnotationUtil.java:180)
	at com.intellij.codeInsight.AnnotationUtil.findAllAnnotations(AnnotationUtil.java:82)
	at com.intellij.codeInsight.AnnotationUtil.findAnnotation(AnnotationUtil.java:63)
	at com.intellij.codeInsight.AnnotationUtil.findAnnotationAndOwnerInHierarchy(AnnotationUtil.java:257)
	at com.intellij.codeInsight.AnnotationUtil.findAnnotationInHierarchy(AnnotationUtil.java:239)
	at com.intellij.codeInsight.AnnotationUtil.findAnnotationInHierarchy(AnnotationUtil.java:233)
	at org.intellij.plugins.intelliLang.util.AnnotationUtilEx.getAnnotationsFromImpl(AnnotationUtilEx.java:237)
	at org.intellij.plugins.intelliLang.util.AnnotationUtilEx.getAnnotationFrom(AnnotationUtilEx.java:219)
	at org.intellij.plugins.intelliLang.util.AnnotationUtilEx.getAnnotationFrom(AnnotationUtilEx.java:262)
	at org.intellij.plugins.intelliLang.inject.java.LanguageReferenceProvider$3.getReferencesByElement(LanguageReferenceProvider.java:81)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getReferences(ReferenceProvidersRegistryImpl.java:162)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.mapNotEmptyReferencesFromProviders(ReferenceProvidersRegistryImpl.java:143)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:122)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:51)
	at com.intellij.psi.PsiReferenceServiceImpl.doGetReferences(PsiReferenceServiceImpl.java:32)
	at com.intellij.psi.PsiReferenceServiceImpl.getReferences(PsiReferenceServiceImpl.java:25)
	at com.intellij.codeInsight.highlighting.HyperlinkAnnotator.lambda$static$0(HyperlinkAnnotator.java:82)
	at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.kt:23)
	at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:236)
	at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:43)
	at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:236)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66)
	at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:237)
	at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.kt:17)
	at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:97)
	at com.intellij.codeInsight.highlighting.HyperlinkAnnotator.getReferences(HyperlinkAnnotator.java:94)
	at com.intellij.codeInsight.highlighting.HyperlinkAnnotator.annotateContributedReferences(HyperlinkAnnotator.java:64)
	at com.intellij.codeInsight.highlighting.HyperlinkAnnotator.annotate(HyperlinkAnnotator.java:59)
	at com.intellij.codeInsight.daemon.impl.AnnotationHolderImpl.runAnnotatorWithContext(AnnotationHolderImpl.java:216)
	at com.intellij.codeInsight.daemon.impl.AnnotatorRunner.lambda$runAnnotator$3(AnnotatorRunner.java:139)
	at com.intellij.codeInsight.daemon.impl.AnnotationSessionImpl.computeWithSession(AnnotationSessionImpl.java:80)
	at com.intellij.codeInsight.daemon.impl.AnnotatorRunner.runAnnotator(AnnotatorRunner.java:129)
	at com.intellij.codeInsight.daemon.impl.AnnotatorRunner.lambda$runAnnotatorsAsync$0(AnnotatorRunner.java:66)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
	at com.intellij.codeInsight.daemon.impl.AnnotatorRunner.lambda$runAnnotatorsAsync$1(AnnotatorRunner.java:66)
	at com.intellij.concurrency.JobLauncherImpl$2MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:494)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
	at com.intellij.concurrency.JobLauncherImpl$2MyProcessQueueTask.call(JobLauncherImpl.java:483)
	at com.intellij.concurrency.JobLauncherImpl$2MyProcessQueueTask.call(JobLauncherImpl.java:471)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1602)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: com.intellij.diagnostic.PluginException: Cannot load class [...]
0

请先登录再写评论。