wt-io-it / odoo-pycharm-plugin

Plugin to Support Odoo in Pycharm
GNU Affero General Public License v3.0
19 stars 10 forks source link

OdooModuleServiceImpl.getModule IndexNotReadyException #101

Closed ap-wtioit closed 1 year ago

ap-wtioit commented 1 year ago

Plugin Version: 0.6.7 IntelliJ Version: PyCharm 2022.3 IntelliJ Build: PY-223.7571.203

com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation ``` com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation at com.intellij.openapi.project.IndexNotReadyException.create(IndexNotReadyException.java:66) at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:841) at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:789) at com.intellij.util.indexing.FileBasedIndexEx.processExceptions(FileBasedIndexEx.java:322) at com.intellij.util.indexing.FileBasedIndexEx.processValueIterator(FileBasedIndexEx.java:443) at com.intellij.util.indexing.FileBasedIndexEx.processValuesInScope(FileBasedIndexEx.java:403) at com.intellij.util.indexing.FileBasedIndexImpl.processValuesInScope(FileBasedIndexImpl.java:1123) at com.intellij.util.indexing.FileBasedIndexEx.getValues(FileBasedIndexEx.java:139) at at.wtioit.intellij.plugins.odoo.index.OdooIndex.getValues(OdooIndex.java:49) at at.wtioit.intellij.plugins.odoo.modules.impl.OdooModuleServiceImpl.lambda$getModule$1(OdooModuleServiceImpl.java:63) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:860) at at.wtioit.intellij.plugins.odoo.modules.impl.OdooModuleServiceImpl.getModule(OdooModuleServiceImpl.java:61) at at.wtioit.intellij.plugins.odoo.pycharm.PyCharmOdooAddonsImportResolver.resolveImportReference(PyCharmOdooAddonsImportResolver.java:48) at com.jetbrains.python.psi.resolve.PyResolveImportUtil$foreignResults$1.invoke(PyResolveImportUtil.kt:199) at com.jetbrains.python.psi.resolve.PyResolveImportUtil$foreignResults$1.invoke(PyResolveImportUtil.kt:199) at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210) at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170) at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194) at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:787) at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:817) at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:808) at com.jetbrains.python.psi.resolve.PyResolveImportUtil.foreignResults(PyResolveImportUtil.kt:201) at com.jetbrains.python.psi.resolve.PyResolveImportUtil.resolveQualifiedName(PyResolveImportUtil.kt:74) at com.jetbrains.python.psi.impl.PyBuiltinCache.getSkeletonFile(PyBuiltinCache.java:161) at com.jetbrains.python.psi.impl.PyBuiltinCache.getBuiltinsForSdk(PyBuiltinCache.java:140) at com.jetbrains.python.psi.resolve.PythonSdkPathCache.getBuiltins(PythonSdkPathCache.java:112) at com.jetbrains.python.psi.impl.PyBuiltinCache.getInstance(PyBuiltinCache.java:88) at com.jetbrains.python.psi.resolve.QualifiedNameFinder.getQualifiedNameInner(QualifiedNameFinder.java:201) at com.jetbrains.python.psi.resolve.QualifiedNameFinder.lambda$getQualifiedName$2(QualifiedNameFinder.java:193) at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:158) at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:39) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:231) at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:41) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:231) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:112) at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:42) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:232) at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:28) at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:72) at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:155) at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:121) at com.jetbrains.python.psi.resolve.QualifiedNameFinder.getQualifiedName(QualifiedNameFinder.java:192) at com.jetbrains.python.psi.impl.PyClassImpl.getQualifiedName(PyClassImpl.java:254) at com.jetbrains.python.psi.PyUtil.isObjectClass(PyUtil.java:1563) at com.jetbrains.python.codeInsight.stdlib.PyOverridingClassDunderMembersProvider.resolveMember(PyOverridingClassDunderMembersProvider.kt:23) at com.jetbrains.python.psi.types.PyClassTypeImpl.resolveByOverridingMembersProviders(PyClassTypeImpl.java:422) at com.jetbrains.python.psi.types.PyClassTypeImpl.doResolveMember(PyClassTypeImpl.java:155) at com.jetbrains.python.psi.types.PyClassTypeImpl.lambda$resolveMember$0(PyClassTypeImpl.java:143) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:112) at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:42) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66) at com.jetbrains.python.psi.types.PyClassTypeImpl.resolveMember(PyClassTypeImpl.java:138) at com.jetbrains.python.pyi.PyiUtil.resolveSimilarMember(PyiUtil.java:217) at com.jetbrains.python.pyi.PyiUtil.findSimilarElement(PyiUtil.java:201) at com.jetbrains.python.pyi.PyiUtil.getPythonStub(PyiUtil.java:61) at com.jetbrains.python.refactoring.suggested.PySuggestedRefactoringSupport$Companion.shouldBeSuppressed(PySuggestedRefactoringSupport.kt:48) at com.jetbrains.python.refactoring.suggested.PySuggestedRefactoringSupport$Companion.isAvailableForChangeSignature$intellij_python_community_impl(PySuggestedRefactoringSupport.kt:26) at com.jetbrains.python.refactoring.suggested.PySuggestedRefactoringSupport$ChangeSignatureSupport.isApplicable(PySuggestedRefactoringSupport.kt:94) at com.jetbrains.python.refactoring.suggested.PySuggestedRefactoringSupport.findSupport(PySuggestedRefactoringSupport.kt:83) at com.jetbrains.python.refactoring.suggested.PySuggestedRefactoringSupport.isAnchor(PySuggestedRefactoringSupport.kt:58) at com.intellij.refactoring.suggested.SuggestedRefactoringSupportKt.anchorByOffset(SuggestedRefactoringSupport.kt:223) at com.intellij.refactoring.suggested.SuggestedRefactoringChangeListener.processBeforeFirstChangeWithPsiAndDocumentInSync$anchorByOffsetInSignature(SuggestedRefactoringChangeListener.kt:112) at com.intellij.refactoring.suggested.SuggestedRefactoringChangeListener.processBeforeFirstChangeWithPsiAndDocumentInSync(SuggestedRefactoringChangeListener.kt:123) at com.intellij.refactoring.suggested.SuggestedRefactoringChangeListener.access$processBeforeFirstChangeWithPsiAndDocumentInSync(SuggestedRefactoringChangeListener.kt:22) at com.intellij.refactoring.suggested.SuggestedRefactoringChangeListener$MyDocumentListener.beforeDocumentChange(SuggestedRefactoringChangeListener.kt:210) at jdk.internal.reflect.GeneratedMethodAccessor190.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:120) at com.intellij.util.EventDispatcher.lambda$createMulticaster$1(EventDispatcher.java:85) at jdk.proxy2/jdk.proxy2.$Proxy88.beforeDocumentChange(Unknown Source) at com.intellij.openapi.editor.impl.DocumentImpl.lambda$beforeChangedUpdate$1(DocumentImpl.java:881) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeNonCancelableSection$3(CoreProgressManager.java:226) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:666) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:622) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$computeInNonCancelableSection$4(CoreProgressManager.java:234) at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:99) at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:234) at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:225) at com.intellij.openapi.editor.impl.DocumentImpl.beforeChangedUpdate(DocumentImpl.java:878) at com.intellij.openapi.editor.impl.DocumentImpl.updateText(DocumentImpl.java:818) at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:664) at com.intellij.openapi.editor.impl.DocumentImpl.replaceText(DocumentImpl.java:533) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$3.run(FileDocumentManagerImpl.java:730) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:955) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$reloadFromDisk$6(FileDocumentManagerImpl.java:716) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.reloadFromDisk(FileDocumentManagerImpl.java:716) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.contentsChanged(FileDocumentManagerImpl.java:695) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$MyAsyncFileListener$1.afterVfsChange(FileDocumentManagerImpl.java:635) at com.intellij.openapi.vfs.newvfs.AsyncEventSupport.afterVfsChange(AsyncEventSupport.java:133) at com.intellij.openapi.vfs.newvfs.AsyncEventSupport.processEventsFromRefresh(AsyncEventSupport.java:156) at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEventsInWriteAction(RefreshSessionImpl.java:223) at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.lambda$fireEvents$1(RefreshSessionImpl.java:204) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runEdtProgressWriteAction$6(ApplicationImpl.java:919) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:190) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:591) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:666) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:622) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:590) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:177) at com.intellij.openapi.progress.util.PotemkinProgress.runInSwingThread(PotemkinProgress.java:150) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runEdtProgressWriteAction$7(ApplicationImpl.java:919) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:943) at com.intellij.openapi.application.impl.ApplicationImpl.runEdtProgressWriteAction(ApplicationImpl.java:917) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithNonCancellableProgressInDispatchThread(ApplicationImpl.java:898) at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.lambda$fireEvents$2(RefreshSessionImpl.java:199) at com.intellij.openapi.application.WriteAction.lambda$run$1(WriteAction.java:86) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:943) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:969) at com.intellij.openapi.application.WriteAction.run(WriteAction.java:85) at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEvents(RefreshSessionImpl.java:198) at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.lambda$queueSession$2(RefreshQueueImpl.java:103) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$safeTransferToEdt$6(NonBlockingReadActionImpl.java:633) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209) at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:813) at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:429) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:74) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:114) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:36) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:749) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:756) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:774) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:813) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92) ```
java.lang.Throwable ``` java.lang.Throwable at com.intellij.openapi.project.DumbServiceImpl.queueTask(DumbServiceImpl.java:293) at com.intellij.openapi.project.DumbModeTask.queue(DumbModeTask.java:68) at com.intellij.indexing.shared.platform.impl.OnDiskSharedIndexChunkLocator.runActivity(OnDiskSharedIndexChunkLocator.java:47) at com.intellij.openapi.project.DumbServiceImpl.queueStartupActivitiesRequiredForSmartMode(DumbServiceImpl.java:142) at com.intellij.openapi.project.DumbServiceStartupActivity$run$2.invoke(DumbServiceStartupActivity.kt:10) at com.intellij.openapi.project.DumbServiceStartupActivity$run$2.invoke(DumbServiceStartupActivity.kt:9) at com.intellij.openapi.progress.CancellationKt.withCurrentJob$lambda-0(cancellation.kt:17) at com.intellij.openapi.progress.Cancellation.withCurrentJob(Cancellation.java:60) at com.intellij.openapi.progress.CancellationKt.withCurrentJob(cancellation.kt:17) at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:142) at com.intellij.openapi.project.DumbServiceStartupActivity.run(DumbServiceStartupActivity.kt:9) at com.intellij.ide.startup.impl.StartupManagerImpl.runInitProjectActivities(StartupManagerImpl.kt:221) at com.intellij.ide.startup.impl.StartupManagerImpl.initProject(StartupManagerImpl.kt:163) at com.intellij.openapi.project.impl.ProjectManagerImplKt$runInitProjectActivities$1.invokeSuspend(ProjectManagerImpl.kt:974) 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) ```

reproduced #90 with full stacktrace, while reproducing #99 in #100

bigbear3001 commented 1 year ago

this is fixed with #67 in 0.6.10 (pending jetbrains approval for the marketplace) if you are eager to test it you can use the jar file from https://github.com/wt-io-it/odoo-pycharm-plugin/tree/v0.6.10

ap-wtioit commented 1 year ago

0.6.10 is available in the marketplace now