Skip to content

Plugin throws Got unexpected type PythonCallableTypeDescription #1961

Closed
@tochilinak

Description

@tochilinak

Description

Plugin throws exception java.lang.IllegalStateException: Got unexpected type PythonCallableTypeDescription: org.utbot.python.newtyping.general.CompositeTypeSubstitutionProvider$Substitution@7d762e57.

To Reproduce

Steps to reproduce the behavior:

  1. Clone project TheAlgorithms/Python.
  2. Open file searches/fibonacci_search.py.
  3. Start test generation for function fibonacci_search.

Expected behavior

Tests are supposed to be generated.

Actual behavior

Exception is thrown.

Visual proofs (screenshots, logs, images)

java.lang.IllegalStateException: Got unexpected type PythonCallableTypeDescription: org.utbot.python.newtyping.general.CompositeTypeSubstitutionProvider$Substitution@7d762e57
	at org.utbot.python.newtyping.PythonCallableTypeDescription.castToCompatibleTypeApi(PythonType.kt:152)
	at org.utbot.python.newtyping.ast.visitor.hints.HintCollector.processFunctionCall(HintCollector.kt:120)
	at org.utbot.python.newtyping.ast.visitor.hints.HintCollector.collectFromNodeAfterRecursion(HintCollector.kt:70)
	at org.utbot.python.newtyping.ast.visitor.Visitor.innerVisit(Visitor.kt:27)
	at org.utbot.python.newtyping.ast.visitor.Visitor.innerVisit(Visitor.kt:25)
	at org.utbot.python.newtyping.ast.visitor.Visitor.innerVisit(Visitor.kt:25)
	at org.utbot.python.newtyping.ast.visitor.Visitor.innerVisit(Visitor.kt:25)
	at org.utbot.python.newtyping.ast.visitor.Visitor.innerVisit(Visitor.kt:25)
	at org.utbot.python.newtyping.ast.visitor.Visitor.innerVisit(Visitor.kt:25)
	at org.utbot.python.newtyping.ast.visitor.Visitor.visit(Visitor.kt:8)
	at org.utbot.python.PythonTestCaseGenerator.constructCollectors(PythonTestCaseGenerator.kt:66)
	at org.utbot.python.PythonTestCaseGenerator.methodHandler(PythonTestCaseGenerator.kt:137)
	at org.utbot.python.PythonTestCaseGenerator.methodHandler$default(PythonTestCaseGenerator.kt:121)
	at org.utbot.python.PythonTestCaseGenerator.generate(PythonTestCaseGenerator.kt:257)
	at org.utbot.python.PythonTestGenerationProcessor.processTestGeneration(PythonTestGenerationProcessor.kt:113)
	at org.utbot.python.PythonTestGenerationProcessor.processTestGeneration$default(PythonTestGenerationProcessor.kt:38)
	at org.utbot.intellij.plugin.language.python.PythonDialogProcessor$createTests$1.run(PythonDialogProcessor.kt:174)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:429)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:480)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)

Metadata

Metadata

Assignees

Labels

ctg-bugIssue is a buglang-pythonIssue is related to python supportstatus-verifiedBug fix is verified

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions