问:
gradle does not load correctly with spotless ktlint
I'm trying to adopt spotless along with ktlint on my micronaut project. By following the official documentation I've written the following build.gradle.kts:

```<code>plugins {
    id("org.jetbrains.kotlin.jvm") version "1.6.21"
    id("org.jetbrains.kotlin.kapt") version "1.6.21"
    id("org.jetbrains.kotlin.plugin.allopen") version "1.6.21"
    id("com.github.johnrengelman.shadow") version "7.1.2"
    id("io.micronaut.application") version "3.6.7"

    id("com.diffplug.spotless") version "5.7.0"
}

version = "0.1"
group = "example.micronaut"
val kotlinVersion = project.properties.get("kotlinVersion")

repositories {
    mavenCentral()
}

dependencies {
    kapt("io.micronaut:micronaut-http-validation")
    implementation("io.micronaut:micronaut-http-client")
    implementation("io.micronaut:micronaut-jackson-databind")
    implementation("io.micronaut.kotlin:micronaut-kotlin-runtime")
    implementation("jakarta.annotation:jakarta.annotation-api")
    implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
    runtimeOnly("ch.qos.logback:logback-classic")
    implementation("io.micronaut:micronaut-validation")
    implementation("com.diffplug.spotless:spotless-plugin-gradle:6.12.0")

    runtimeOnly("com.fasterxml.jackson.module:jackson-module-kotlin")
}

application {
    mainClass.set("example.micronaut.MainKt")
}

java {
    sourceCompatibility = JavaVersion.toVersion("17")
}

tasks {
    compileKotlin {
        kotlinOptions {
            jvmTarget = "17"
        }
    }
    compileTestKotlin {
        kotlinOptions {
            jvmTarget = "17"
        }
    }
}
graalvmNative.toolchainDetection.set(false)

micronaut {
    runtime("netty")
    testRuntime("junit5")
    processing {
        incremental(true)
        annotations("example.micronaut.*")
    }
}

spotless {
    kotlin {
        // version, setUseExperimental, userData and editorConfigOverride are all optional
        ktlint("0.48.0")
            .userData(mapOf("android" to "false"))
    }
}

tasks.named<io.micronaut.gradle.docker.MicronautDockerfile>("dockerfile") {
    baseImage.set("eclipse-temurin:19.0.1_10-jre")
}

tasks.check { dependsOn(tasks.spotlessCheck) }

</code>```

but it does not work by generating the following error:

```<code>Could not create task ':spotlessKotlinApply'.
Could not create task ':spotlessKotlin'.
'com.diffplug.spotless.FormatterStep com.diffplug.spotless.kotlin.KtLintStep.create(java.lang.String,com.diffplug.spotless.Provisioner, java.util.Map)'
</code>```
```Can not load tasks for root project 'hello-api-kotlin'

org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':spotlessKotlin'.
    at org.gradle.api.internal.tasks.DefaultTaskContainer.taskCreationException(DefaultTaskContainer.java:715)
    at org.gradle.api.internal.tasks.DefaultTaskContainer.access$600(DefaultTaskContainer.java:76)
    at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.domainObjectCreationException(DefaultTaskContainer.java:707)
    at org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.tryCreate(DefaultNamedDomainObjectCollection.java:948)
    at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.access$1401(DefaultTaskContainer.java:654)
    at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider$1.run(DefaultTaskContainer.java:680)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
    at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.tryCreate(DefaultTaskContainer.java:676)
    at org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.calculateOwnValue(DefaultNamedDomainObjectCollection.java:929)
    at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:102)
    at org.gradle.api.internal.provider.Collectors$ElementFromProvider.collectEntries(Collectors.java:100)
    at org.gradle.api.internal.provider.Collectors$TypedCollector.collectEntries(Collectors.java:333)
    at org.gradle.api.internal.provider.Collectors$TypedCollector.collectInto(Collectors.java:328)
    at org.gradle.api.internal.collections.DefaultPendingSource.realize(DefaultPendingSource.java:61)
    at org.gradle.api.internal.collections.DefaultPendingSource.realizePending(DefaultPendingSource.java:39)
    at org.gradle.api.internal.collections.SortedSetElementSource.iterator(SortedSetElementSource.java:63)
    at org.gradle.api.internal.DefaultDomainObjectCollection.iterator(DefaultDomainObjectCollection.java:128)
    at org.gradle.api.internal.tasks.DefaultTaskContainer.iterator(DefaultTaskContainer.java:620)
    at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:335)
    at java.base/java.util.TreeSet.addAll(TreeSet.java:309)
    at java.base/java.util.TreeSet.<init>(TreeSet.java:160)
    at org.jetbrains.plugins.gradle.tooling.builder.TasksFactory.getAllTasks(TasksFactory.java:56)
    at org.jetbrains.plugins.gradle.tooling.builder.TasksFactory.collectTasks(TasksFactory.java:46)
    at org.jetbrains.plugins.gradle.tooling.builder.TasksFactory.getTasks(TasksFactory.java:78)
    at org.jetbrains.gradle.profiler.builder.JavaTaskModelBuilderImpl.buildAll(JavaTaskModelBuilderImpl.java:34)
    at org.jetbrains.plugins.gradle.tooling.internal.ExtraModelBuilder.buildAll(ExtraModelBuilder.java:107)
    at org.jetbrains.plugins.gradle.tooling.internal.ExtraModelBuilder.buildAll(ExtraModelBuilder.java:76)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuilderWithParameter.build(DefaultToolingModelBuilderRegistry.java:287)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$UserCodeAssigningBuilder.lambda$build$0(DefaultToolingModelBuilderRegistry.java:374)
    at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication.reapply(DefaultUserCodeApplicationContext.java:109)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$UserCodeAssigningBuilder.build(DefaultToolingModelBuilderRegistry.java:374)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$LockSingleProjectBuilder.lambda$build$0(DefaultToolingModelBuilderRegistry.java:304)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$fromMutableState$1(DefaultProjectStateRegistry.java:374)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withReplacedLocks(DefaultWorkerLeaseService.java:345)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:374)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$LockSingleProjectBuilder.build(DefaultToolingModelBuilderRegistry.java:304)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder$1.call(DefaultToolingModelBuilderRegistry.java:337)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder.build(DefaultToolingModelBuilderRegistry.java:334)
    at org.gradle.internal.build.DefaultBuildToolingModelController$AbstractToolingScope.getModel(DefaultBuildToolingModelController.java:82)
    at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getModel(DefaultBuildController.java:106)
    at org.gradle.tooling.internal.consumer.connection.ParameterAwareBuildControllerAdapter.getModel(ParameterAwareBuildControllerAdapter.java:39)
    at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.getModel(UnparameterizedBuildController.java:113)
    at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.getModel(NestedActionAwareBuildControllerAdapter.java:31)
    at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.findModel(UnparameterizedBuildController.java:97)
    at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.findModel(NestedActionAwareBuildControllerAdapter.java:31)
    at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.findModel(UnparameterizedBuildController.java:81)
    at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.findModel(NestedActionAwareBuildControllerAdapter.java:31)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction$MyBuildController.findModel(ProjectImportAction.java:658)
    at org.jetbrains.plugins.gradle.model.ClassSetProjectImportModelProvider.populateProjectModels(ClassSetProjectImportModelProvider.java:31)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.getProjectModels(ProjectImportAction.java:338)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.access$500(ProjectImportAction.java:42)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction$4.execute(ProjectImportAction.java:249)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction$4.execute(ProjectImportAction.java:246)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.fetchProjectBuildModels(ProjectImportAction.java:262)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:137)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
    at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:64)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.runAction(AbstractClientProvidedBuildActionRunner.java:131)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.fromBuildModel(AbstractClientProvidedBuildActionRunner.java:104)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.fromBuildModel(AbstractClientProvidedBuildActionRunner.java:84)
    at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator.fromBuildModel(DefaultBuildTreeModelCreator.java:57)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$fromBuildModel$1(DefaultBuildTreeLifecycleController.java:82)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:106)
    at org.gradle.internal.model.StateTransitionController.lambda$transition$5(StateTransitionController.java:166)
    at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:247)
    at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:166)
    at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
    at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:166)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:103)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.fromBuildModel(DefaultBuildTreeLifecycleController.java:74)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner.runClientAction(AbstractClientProvidedBuildActionRunner.java:43)
    at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:53)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
    at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:65)
    at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:136)
    at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
    at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:122)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
    at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:65)
    at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:65)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:249)
    at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:109)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110)
    at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
    at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:100)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:88)
    at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:52)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:40)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
    at org.gradle.util.internal.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    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.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NoSuchMethodError: 'com.diffplug.spotless.FormatterStep com.diffplug.spotless.kotlin.KtLintStep.create(java.lang.String, com.diffplug.spotless.Provisioner, java.util.Map)'
    at com.diffplug.gradle.spotless.KotlinExtension$KotlinFormatExtension.createStep(KotlinExtension.java:83)
    at com.diffplug.gradle.spotless.KotlinExtension$KotlinFormatExtension.<init>(KotlinExtension.java:72)
    at com.diffplug.gradle.spotless.KotlinExtension.ktlint(KotlinExtension.java:57)
    at Build_gradle$7$1.execute(build.gradle.kts:68)
    at Build_gradle$7$1.execute(build.gradle.kts:1)
    at com.diffplug.gradle.spotless.SpotlessExtensionImpl.lambda$createFormatTasks$6(SpotlessExtensionImpl.java:81)
    at org.gradle.api.internal.DefaultMutationGuard$2.execute(DefaultMutationGuard.java:44)
    at org.gradle.api.internal.DefaultMutationGuard$2.execute(DefaultMutationGuard.java:44)
    at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:123)
    at org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction$1.run(DefaultCollectionCallbackActionDecorator.java:110)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
    at org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction.execute(DefaultCollectionCallbackActionDecorator.java:107)
    at org.gradle.internal.ImmutableActionSet$SetWithManyActions.execute(ImmutableActionSet.java:329)
    at org.gradle.api.internal.DefaultDomainObjectCollection.doAdd(DefaultDomainObjectCollection.java:262)
    at org.gradle.api.internal.DefaultNamedDomainObjectCollection.doAdd(DefaultNamedDomainObjectCollection.java:113)
    at org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:256)
    at org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.tryCreate(DefaultNamedDomainObjectCollection.java:944)
    ... 153 more
```

Body:
I'm trying to adopt spotless along with ktlint on my micronaut project. By following the official documentation I've written the following build.gradle.kts:

plugins {
    id("org.jetbrains.kotlin.jvm") version "1.6.21"
    id("org.jetbrains.kotlin.kapt") version "1.6.21"
    id("org.jetbrains.kotlin.plugin.allopen") version "1.6.21"
    id("com.github.johnrengelman.shadow") version "7.1.2"
    id("io.micronaut.application") version "3.6.7"

    id("com.diffplug.spotless") version "5.7.0"
}

version = "0.1"
group = "example.micronaut"
val kotlinVersion = project.properties.get("kotlinVersion")

repositories {
    mavenCentral()
}

dependencies {
    kapt("io.micronaut:micronaut-http-validation")
    implementation("io.micronaut:micronaut-http-client")
    implementation("io.micronaut:micronaut-jackson-databind")
    implementation("io.micronaut.kotlin:micronaut-kotlin-runtime")
    implementation("jakarta.annotation:jakarta.annotation-api")
    implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
    runtimeOnly("ch.qos.logback:logback-classic")
    implementation("io.micronaut:micronaut-validation")
    implementation("com.diffplug.spotless:spotless-plugin-gradle:6.12.0")

    runtimeOnly("com.fasterxml.jackson.module:jackson-module-kotlin")
}

application {
    mainClass.set("example.micronaut.MainKt")
}

java {
    sourceCompatibility = JavaVersion.toVersion("17")
}

tasks {
    compileKotlin {
        kotlinOptions {
            jvmTarget = "17"
        }
    }
    compileTestKotlin {
        kotlinOptions {
            jvmTarget = "17"
        }
    }
}
graalvmNative.toolchainDetection.set(false)

micronaut {
    runtime("netty")
    testRuntime("junit5")
    processing {
        incremental(true)
        annotations("example.micronaut.*")
    }
}

spotless {
    kotlin {
        // version, setUseExperimental, userData and editorConfigOverride are all optional
        ktlint("0.48.0")
            .userData(mapOf("android" to "false"))
    }
}

tasks.named<io.micronaut.gradle.docker.MicronautDockerfile>("dockerfile") {
    baseImage.set("eclipse-temurin:19.0.1_10-jre")
}

tasks.check { dependsOn(tasks.spotlessCheck) }

but it does not work by generating the following error:

Could not create task ':spotlessKotlinApply'.
Could not create task ':spotlessKotlin'.
'com.diffplug.spotless.FormatterStep com.diffplug.spotless.kotlin.KtLintStep.create(java.lang.String,com.diffplug.spotless.Provisioner, java.util.Map)'

Can not load tasks for root project 'hello-api-kotlin'

org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':spotlessKotlin'.
    at org.gradle.api.internal.tasks.DefaultTaskContainer.taskCreationException(DefaultTaskContainer.java:715)
    at org.gradle.api.internal.tasks.DefaultTaskContainer.access$600(DefaultTaskContainer.java:76)
    at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.domainObjectCreationException(DefaultTaskContainer.java:707)
    at org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.tryCreate(DefaultNamedDomainObjectCollection.java:948)
    at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.access$1401(DefaultTaskContainer.java:654)
    at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider$1.run(DefaultTaskContainer.java:680)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
    at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.tryCreate(DefaultTaskContainer.java:676)
    at org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.calculateOwnValue(DefaultNamedDomainObjectCollection.java:929)
    at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:102)
    at org.gradle.api.internal.provider.Collectors$ElementFromProvider.collectEntries(Collectors.java:100)
    at org.gradle.api.internal.provider.Collectors$TypedCollector.collectEntries(Collectors.java:333)
    at org.gradle.api.internal.provider.Collectors$TypedCollector.collectInto(Collectors.java:328)
    at org.gradle.api.internal.collections.DefaultPendingSource.realize(DefaultPendingSource.java:61)
    at org.gradle.api.internal.collections.DefaultPendingSource.realizePending(DefaultPendingSource.java:39)
    at org.gradle.api.internal.collections.SortedSetElementSource.iterator(SortedSetElementSource.java:63)
    at org.gradle.api.internal.DefaultDomainObjectCollection.iterator(DefaultDomainObjectCollection.java:128)
    at org.gradle.api.internal.tasks.DefaultTaskContainer.iterator(DefaultTaskContainer.java:620)
    at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:335)
    at java.base/java.util.TreeSet.addAll(TreeSet.java:309)
    at java.base/java.util.TreeSet.<init>(TreeSet.java:160)
    at org.jetbrains.plugins.gradle.tooling.builder.TasksFactory.getAllTasks(TasksFactory.java:56)
    at org.jetbrains.plugins.gradle.tooling.builder.TasksFactory.collectTasks(TasksFactory.java:46)
    at org.jetbrains.plugins.gradle.tooling.builder.TasksFactory.getTasks(TasksFactory.java:78)
    at org.jetbrains.gradle.profiler.builder.JavaTaskModelBuilderImpl.buildAll(JavaTaskModelBuilderImpl.java:34)
    at org.jetbrains.plugins.gradle.tooling.internal.ExtraModelBuilder.buildAll(ExtraModelBuilder.java:107)
    at org.jetbrains.plugins.gradle.tooling.internal.ExtraModelBuilder.buildAll(ExtraModelBuilder.java:76)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuilderWithParameter.build(DefaultToolingModelBuilderRegistry.java:287)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$UserCodeAssigningBuilder.lambda$build$0(DefaultToolingModelBuilderRegistry.java:374)
    at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication.reapply(DefaultUserCodeApplicationContext.java:109)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$UserCodeAssigningBuilder.build(DefaultToolingModelBuilderRegistry.java:374)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$LockSingleProjectBuilder.lambda$build$0(DefaultToolingModelBuilderRegistry.java:304)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$fromMutableState$1(DefaultProjectStateRegistry.java:374)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withReplacedLocks(DefaultWorkerLeaseService.java:345)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:374)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$LockSingleProjectBuilder.build(DefaultToolingModelBuilderRegistry.java:304)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder$1.call(DefaultToolingModelBuilderRegistry.java:337)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder.build(DefaultToolingModelBuilderRegistry.java:334)
    at org.gradle.internal.build.DefaultBuildToolingModelController$AbstractToolingScope.getModel(DefaultBuildToolingModelController.java:82)
    at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getModel(DefaultBuildController.java:106)
    at org.gradle.tooling.internal.consumer.connection.ParameterAwareBuildControllerAdapter.getModel(ParameterAwareBuildControllerAdapter.java:39)
    at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.getModel(UnparameterizedBuildController.java:113)
    at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.getModel(NestedActionAwareBuildControllerAdapter.java:31)
    at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.findModel(UnparameterizedBuildController.java:97)
    at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.findModel(NestedActionAwareBuildControllerAdapter.java:31)
    at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.findModel(UnparameterizedBuildController.java:81)
    at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.findModel(NestedActionAwareBuildControllerAdapter.java:31)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction$MyBuildController.findModel(ProjectImportAction.java:658)
    at org.jetbrains.plugins.gradle.model.ClassSetProjectImportModelProvider.populateProjectModels(ClassSetProjectImportModelProvider.java:31)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.getProjectModels(ProjectImportAction.java:338)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.access$500(ProjectImportAction.java:42)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction$4.execute(ProjectImportAction.java:249)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction$4.execute(ProjectImportAction.java:246)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.fetchProjectBuildModels(ProjectImportAction.java:262)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:137)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
    at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:64)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.runAction(AbstractClientProvidedBuildActionRunner.java:131)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.fromBuildModel(AbstractClientProvidedBuildActionRunner.java:104)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.fromBuildModel(AbstractClientProvidedBuildActionRunner.java:84)
    at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator.fromBuildModel(DefaultBuildTreeModelCreator.java:57)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$fromBuildModel$1(DefaultBuildTreeLifecycleController.java:82)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:106)
    at org.gradle.internal.model.StateTransitionController.lambda$transition$5(StateTransitionController.java:166)
    at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:247)
    at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:166)
    at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
    at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:166)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:103)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.fromBuildModel(DefaultBuildTreeLifecycleController.java:74)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner.runClientAction(AbstractClientProvidedBuildActionRunner.java:43)
    at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:53)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
    at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:65)
    at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:136)
    at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
    at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:122)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
    at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:65)
    at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:65)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:249)
    at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:109)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110)
    at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
    at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:100)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:88)
    at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:52)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:40)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
    at org.gradle.util.internal.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    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.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NoSuchMethodError: 'com.diffplug.spotless.FormatterStep com.diffplug.spotless.kotlin.KtLintStep.create(java.lang.String, com.diffplug.spotless.Provisioner, java.util.Map)'
    at com.diffplug.gradle.spotless.KotlinExtension$KotlinFormatExtension.createStep(KotlinExtension.java:83)
    at com.diffplug.gradle.spotless.KotlinExtension$KotlinFormatExtension.<init>(KotlinExtension.java:72)
    at com.diffplug.gradle.spotless.KotlinExtension.ktlint(KotlinExtension.java:57)
    at Build_gradle$7$1.execute(build.gradle.kts:68)
    at Build_gradle$7$1.execute(build.gradle.kts:1)
    at com.diffplug.gradle.spotless.SpotlessExtensionImpl.lambda$createFormatTasks$6(SpotlessExtensionImpl.java:81)
    at org.gradle.api.internal.DefaultMutationGuard$2.execute(DefaultMutationGuard.java:44)
    at org.gradle.api.internal.DefaultMutationGuard$2.execute(DefaultMutationGuard.java:44)
    at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:123)
    at org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction$1.run(DefaultCollectionCallbackActionDecorator.java:110)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
    at org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction.execute(DefaultCollectionCallbackActionDecorator.java:107)
    at org.gradle.internal.ImmutableActionSet$SetWithManyActions.execute(ImmutableActionSet.java:329)
    at org.gradle.api.internal.DefaultDomainObjectCollection.doAdd(DefaultDomainObjectCollection.java:262)
    at org.gradle.api.internal.DefaultNamedDomainObjectCollection.doAdd(DefaultNamedDomainObjectCollection.java:113)
    at org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:256)
    at org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.tryCreate(DefaultNamedDomainObjectCollection.java:944)
    ... 153 more


来源: stackexchange

问:
Visualizing emoji data in R studio
This is a very general inquiry about working with emoji data in R studio.

I previously finished a project with emoji data, and the hardest thing I found was visualizing emojis in R studio. I tried to run a co-occurrence network analysis with emojis, but I couldn't visualize the result (emojis were shown as squares in the plot).

I tried emojifont and emo packages, and none of them worked.

Are there other packages that help visualize emojis or analyze emoji data?

ContentLicense: CC BY-SA 4.0

Title: Visualizing emoji data in R studio


问:
Error in audioDetect.js of MIDI.js (midicube)
I'm trying to use MIDI.js (because I don't know how else to play MIDI files smoothly when the browser tab is not in focus). More specifically, I'm trying a new version of MIDI.js called midicube.

Like in the readme, I do

```
<p>but I get</p>
```audioDetect.js:38 Uncaught TypeError: Cannot read properties of null (reading 'appendChild')
    at s (audioDetect.js:38:22)
    at audioDetect.js:106:9
    at Module.$t (index.js:94:5)
    at mytest.html:3:6
s @ audioDetect.js:38
(anonymous) @ audioDetect.js:106
$t @ index.js:94
(anonymous) @ mytest.html:3
audioDetect.js:36 Uncaught TypeError: Cannot read properties of null (reading 'removeChild')
    at Audio.<anonymous> (audioDetect.js:36:8)
```

Here are the lines of code that cause the error. Am I doing something wrong or is midicube outdated in some way (latest commit 3 years ago)?

Body:
I'm trying to use MIDI.js (because I don't know how else to play MIDI files smoothly when the browser tab is not in focus). More specifically, I'm trying a new version of MIDI.js called midicube.

Like in the readme, I do

but I get

audioDetect.js:38 Uncaught TypeError: Cannot read properties of null (reading 'appendChild')
    at s (audioDetect.js:38:22)
    at audioDetect.js:106:9
    at Module.$t (index.js:94:5)
    at mytest.html:3:6
s @ audioDetect.js:38
(anonymous) @ audioDetect.js:106
$t @ index.js:94
(anonymous) @ mytest.html:3
audioDetect.js:36 Uncaught TypeError: Cannot read properties of null (reading 'removeChild')
    at Audio.<anonymous> (audioDetect.js:36:8)

Here are the lines of code that cause the error. Am I doing something wrong or is midicube outdated in some way (latest commit 3 years ago)?


问:
How to Complete Simple Exponential Smoothing Plot for Time Series Forecasting
I am currently working on a Time Series Forecasting exercise using R. As a part of the exercise, I am trying to create a Simple Exponential Smoothing plot. The problem is that I keep receiving the following error using the code below:

```<code>Error in ets(x, "ANN", alpha = alpha, opt.crit = "mse", lambda = lambda,  :
No model able to be fitted).
</code>```

If it helps, here is the link to the exercise: https://www.kaggle.com/code/brwalk/an-introduction-to-time-series-forecasting-in-r/notebook

```<code>autoplot(ses(sales), PI = FALSE)
</code>```

Body:
I am currently working on a Time Series Forecasting exercise using R. As a part of the exercise, I am trying to create a Simple Exponential Smoothing plot. The problem is that I keep receiving the following error using the code below:

Error in ets(x, "ANN", alpha = alpha, opt.crit = "mse", lambda = lambda,  :
No model able to be fitted).

If it helps, here is the link to the exercise: https://www.kaggle.com/code/brwalk/an-introduction-to-time-series-forecasting-in-r/notebook

autoplot(ses(sales), PI = FALSE)


问:
Accessing multiple Git repos in Visual Studio 2022
I am looking for a way to use Visual Studio 2022 to access and sync with two different repositories. One repository is C# code. The other is Javascript code. Both repositories are currently on Github and are separate.

In one mode, I modify the javascript code using a text editor and XAMPP as a localhost to test the code.

I am trying to use C# and Webview2 inside Visual Studio 2022 to test my javascript code. I would like to add the JS code into my VS2022 project (Using Add existing item and point to files in the JS Code repository) and  have it sync with the JS repo. The C# code would only sync with the C# repo.

I have read that Visual Studio 2022 supports multiple repositories.

I found this on Devblogs.microsoft.com:
Multi-Repo Branching

In short, I need some of my files to be part of one repository while other files are part of a second repository. Can this be done? If so, what are the steps.

Thanks

Dave


问:
Inserted iframes are not cleared from the DOM with GTM
I have a GTM script implemented in my Angular application (SPA - Single Page Application).

When I change the page, a Page-View event is triggered via: window.dataLayer.push(obj)

obj represents the whole object.

On GTM side, I have 2 triggers as a result:

Insert to the DOM a Custom HTML element (a script element) that triggers another dataLayer.push with a simple object that indicates the new page view and the previous referer.

Insert to the DOM an iframe of type DoubleClick Floodlight to track certain behaviors for a short lifespan.

Now, to my understanding, these events should have been inserted to the DOM once and get cleared after that.

As it seems, for every page view that a user creates while navigating in the app, linearly, 2 elements are appended to the DOM (scropt element + iframe).

This behavior causes a tremendous amount of js heap size. I see a great memory leak in the Memory tab in chrome DevTools.

Of course, dataLayer keeps track of events and once it gets to 300 events it pops the oldest event, etc...

I would like to know is this is an expected behavior by design and it's just me that is missing a key component in GTM.

Am I supposed to create a cleanup tag to trigger after all of my elements are inserted to the DOM?

Or even better, try to track it and remove it from within my application?

I feel like I did not truly understand my problem so I can only hope you have a clue what I'm aiming to explain here.

Thanks ahead.

I did not try anything.

All I did was to read stackoverflow questions and answers, combined with a lot of articles, videos, dry documentation.

I do have a few leads as to what to try and tackle but I prefer the community to guide me through their experience if possible.


问:
Class not found error in Godot Mono Version
So I linked a .dll file of a library I made myself in the .csproj file of my Godot project:

```<code>  <ItemGroup>
    <Reference Include="BiomeLibrary">
      <Private>False</Private>
      <HintPath>$(ProjectDir)/lib/BiomeLibrary.dll</HintPath>
    </Reference>
  </ItemGroup>
</code>```

and then I wanted to use it in a C# script, but everytime I do that, I get this Error:

```<code>E 0:00:00.776   can_instance: Cannot instance script because the class 'BLTest' could not be found. Script: 'res://BLTest.cs'.
  <C++-Fehler>  Method failed. Returning: __null
  <C++-Quellcode>modules/mono/csharp_script.cpp:2892 @ can_instance()

</code>```

BLTest is the class of the script.
I don't get it, please help me.

I tried it in different scripts and projects, but always the same.

Body:
So I linked a .dll file of a library I made myself in the .csproj file of my Godot project:

  <ItemGroup>
    <Reference Include="BiomeLibrary">
      <Private>False</Private>
      <HintPath>$(ProjectDir)/lib/BiomeLibrary.dll</HintPath>
    </Reference>
  </ItemGroup>

and then I wanted to use it in a C# script, but everytime I do that, I get this Error:

E 0:00:00.776   can_instance: Cannot instance script because the class 'BLTest' could not be found. Script: 'res://BLTest.cs'.
  <C++-Fehler>  Method failed. Returning: __null
  <C++-Quellcode>modules/mono/csharp_script.cpp:2892 @ can_instance()

BLTest is the class of the script.
I don't get it, please help me.

I tried it in different scripts and projects, but always the same.


问:
How to modified sky mote or wake change wake up time periodically in contiki 2.7?
I am working on the Contiki 2.7 cooja simulator . I want to modified sky mote and I want to change periodically wake up time for each node manually ?

I check the hello.c and ipv6 sender c. file but I can not find any solution


问:
Keycloak production
I have used the official docker file to create an image from the webiste https://www.keycloak.org/server/containers

But while running the container using the comand

```<code>docker run --name mykeycloak -p 8443:8443 \
        -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=change_me \
        mykeycloak \
        start --optimized -- --hostname-strict=false
</code>```

It is showing the below error.
ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (production) mode
2022-12-26 17:11:45,894 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Key material not provided to setup HTTPS. Please configure your keydevelopment mode.

For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.

Title: Keycloak production

Body:
I have used the official docker file to create an image from the webiste https://www.keycloak.org/server/containers

But while running the container using the comand

docker run --name mykeycloak -p 8443:8443 \
        -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=change_me \
        mykeycloak \
        start --optimized -- --hostname-strict=false

It is showing the below error.
ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (production) mode
2022-12-26 17:11:45,894 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Key material not provided to setup HTTPS. Please configure your keydevelopment mode.

For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.


问:
NotificationListenerService trigger on sound
onNotificationPosted is called a unconsistent time before the notification sound triggers. I want to turn on and off an led on my nothing phone (1) whenever a specific notification comes. At the moment, I can filter out the right notification but the led cannot be synced to the sound. The function is called between 500ms and 1000ms before the notification sound is audible. Putting a delay does not work since it's between 500ms and 1000ms randomly when the sound comes.

This is my implementation:

```<code>public class NotificationListener extends NotificationListenerService {

    private final String TAG = this.getClass().getSimpleName();

    private int dot_led = 16;
    private int rec_led = 17;
    private int fcam_led = 1;
    private int bcam_led = 7;
    private int vline_leds[] = {13, 11, 9, 12, 10, 14, 15, 8};
    private int circle_leds[] = {3, 2, 5, 4};

    @Override
    public void onNotificationPosted(StatusBarNotification sbn) {
        Log.i(TAG, "**********  onNotificationPosted");
        Log.i(TAG, "ID :" + sbn.getId() + "\t" + sbn.getNotification().tickerText + "\t" + sbn.getPackageName());
        if (sbn.getPackageName().equals("org.kde.kdeconnect_tp")) {
            kde_sound();
        }
    }
    void kde_sound() {
        Handler handler = new Handler();
        handler.post(new Runnable() {
            @Override
            public void run() {
                try{
                    Process su = Runtime.getRuntime().exec("su");
                    DataOutputStream outputStream = new DataOutputStream(su.getOutputStream());

                    Thread.sleep(700); // This is the closest I can get but it's not perfect nor consistent

                    outputStream.writeBytes("echo " + rec_led + " " + 255 + " > /sys/class/leds/aw210xx_led/single_led_br\n");
                    outputStream.flush();

                    // off

                    for (int i = 255; i >= 0; i--) {
                        outputStream.writeBytes("echo " + rec_led + " " + i + " > /sys/class/leds/aw210xx_led/single_led_br\n");
                        outputStream.flush();
                    }

                    outputStream.writeBytes("exit\n");
                    outputStream.flush();
                    try {
                        su.waitFor();
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    outputStream.close();
                }catch(IOException | InterruptedException e){
                    e.printStackTrace();
                }
            }
        });
    }
}
</code>```

How can I resolve this and sync the function call to the notification sound?

Body:
onNotificationPosted is called a unconsistent time before the notification sound triggers. I want to turn on and off an led on my nothing phone (1) whenever a specific notification comes. At the moment, I can filter out the right notification but the led cannot be synced to the sound. The function is called between 500ms and 1000ms before the notification sound is audible. Putting a delay does not work since it's between 500ms and 1000ms randomly when the sound comes.

This is my implementation:

public class NotificationListener extends NotificationListenerService {

    private final String TAG = this.getClass().getSimpleName();

    private int dot_led = 16;
    private int rec_led = 17;
    private int fcam_led = 1;
    private int bcam_led = 7;
    private int vline_leds[] = {13, 11, 9, 12, 10, 14, 15, 8};
    private int circle_leds[] = {3, 2, 5, 4};

    @Override
    public void onNotificationPosted(StatusBarNotification sbn) {
        Log.i(TAG, "**********  onNotificationPosted");
        Log.i(TAG, "ID :" + sbn.getId() + "\t" + sbn.getNotification().tickerText + "\t" + sbn.getPackageName());
        if (sbn.getPackageName().equals("org.kde.kdeconnect_tp")) {
            kde_sound();
        }
    }
    void kde_sound() {
        Handler handler = new Handler();
        handler.post(new Runnable() {
            @Override
            public void run() {
                try{
                    Process su = Runtime.getRuntime().exec("su");
                    DataOutputStream outputStream = new DataOutputStream(su.getOutputStream());

                    Thread.sleep(700); // This is the closest I can get but it's not perfect nor consistent

                    outputStream.writeBytes("echo " + rec_led + " " + 255 + " > /sys/class/leds/aw210xx_led/single_led_br\n");
                    outputStream.flush();

                    // off

                    for (int i = 255; i >= 0; i--) {
                        outputStream.writeBytes("echo " + rec_led + " " + i + " > /sys/class/leds/aw210xx_led/single_led_br\n");
                        outputStream.flush();
                    }

                    outputStream.writeBytes("exit\n");
                    outputStream.flush();
                    try {
                        su.waitFor();
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    outputStream.close();
                }catch(IOException | InterruptedException e){
                    e.printStackTrace();
                }
            }
        });
    }
}

How can I resolve this and sync the function call to the notification sound?


问:
I try to make a Daily Gamble Game however
I try to get the Highest Number out of my Databse.
So far so good Test 1 Code:

```<code>const db = require("../../../database.js")
const test = require("./test.js")
module.exports = {
    config: {
      name: "try",
      description: "Replies with a Number.",
    },
    permissions: ['SendMessages'],
    owner: false,
    run: async (client, message, args, prefix) => {
    const test = await db.query("select Number, MemberID from numbers order by Number DESC LIMIT 3;")
    console.log(test[1])
    console.log(test[1].Number)
    }}
</code>```

But all I get out in my Console is:

```<code>Executing (default): select Number, MemberID from numbers order by Number DESC LIMIT 3;
[ { Number: 138, MemberID: '318735407963439104' } ]
undefined
</code>```

So I tried another Version:

```<code>const db = require("../../../database.js")
module.exports = {
    config: {
      name: "stats",
      description: "Replies with a Number.",
    },
    permissions: ['SendMessages'],
    owner: false,
    run: async (client, message, args, prefix) => {
  const query = await db.query("select Number, MemberID from numbers order by Number DESC LIMIT 3;", async function (err, result, fields)
    {
        console.log(query)
    const level = result[0].Number
    const user = result[0].MemberID
   const level1 = result[1].Number
    const user1 = result[1].MemberID
  const level2 = result[2].Number1
   const user2 = result[2].MemberID

   console.log(level)
})
    }
};
</code>```

But this just showed this in the Console

```<code>Executing (default): select Number,MemberID from numbers order by Number DESC LIMIT 3;
</code>```

and nothing else.

I'm really depressed that nothing works, can someone help?

Body:
I try to get the Highest Number out of my Databse.
So far so good Test 1 Code:

const db = require("../../../database.js")
const test = require("./test.js")
module.exports = {
    config: {
      name: "try",
      description: "Replies with a Number.",
    },
    permissions: ['SendMessages'],
    owner: false,
    run: async (client, message, args, prefix) => {
    const test = await db.query("select Number, MemberID from numbers order by Number DESC LIMIT 3;")
    console.log(test[1])
    console.log(test[1].Number)
    }}

But all I get out in my Console is:

Executing (default): select Number, MemberID from numbers order by Number DESC LIMIT 3;
[ { Number: 138, MemberID: '318735407963439104' } ]
undefined

So I tried another Version:

const db = require("../../../database.js")
module.exports = {
    config: {
      name: "stats",
      description: "Replies with a Number.",
    },
    permissions: ['SendMessages'],
    owner: false,
    run: async (client, message, args, prefix) => {
  const query = await db.query("select Number, MemberID from numbers order by Number DESC LIMIT 3;", async function (err, result, fields)
    {
        console.log(query)
    const level = result[0].Number
    const user = result[0].MemberID
   const level1 = result[1].Number
    const user1 = result[1].MemberID
  const level2 = result[2].Number1
   const user2 = result[2].MemberID

   console.log(level)
})
    }
};

But this just showed this in the Console

Executing (default): select Number,MemberID from numbers order by Number DESC LIMIT 3;

and nothing else.

I'm really depressed that nothing works, can someone help?


问:
How to call correctly a String splitting method from another class?
Im trying to access the Spring splitting method from Person class in Main class, but it doesn't show me only the last result from the text. Its working very good when im integrating System.out.prinln in Person class, in method body but In this homework im not aloud to use System.out in Person class, only in Main class. The result must split the text in "Surname , Name , City". Where am i doing wrong? Thank you!

```<code>public class Person {
    public String surname;
    public String name;
    public String city;

    public Person(String text) {

        String[] person = text.split(" ");
        for (int i = 0; i < person.length; i++) {
            String surname = person[i].split("[.]")[0];
            String name = person[i].split("[./]")[1];
            String city = person[i].split("/")[1];

            this.surname = surname;
            this.name = name;
            this.city = city;
        }

    }
    }
</code>```
```<code>public class Main {
    public static void main(String[] args) {

        Person p1 = new Person("John.Davidson/Berlin Michael.Barton/Rome Ivan.Perkinson/Munich");
        System.out.println(p1.surname + p1.name + p1.city);
// the result is the only the last persons info
}
}
</code>```

Body:
Im trying to access the Spring splitting method from Person class in Main class, but it doesn't show me only the last result from the text. Its working very good when im integrating System.out.prinln in Person class, in method body but In this homework im not aloud to use System.out in Person class, only in Main class. The result must split the text in "Surname , Name , City". Where am i doing wrong? Thank you!

public class Person {
    public String surname;
    public String name;
    public String city;

    public Person(String text) {

        String[] person = text.split(" ");
        for (int i = 0; i < person.length; i++) {
            String surname = person[i].split("[.]")[0];
            String name = person[i].split("[./]")[1];
            String city = person[i].split("/")[1];

            this.surname = surname;
            this.name = name;
            this.city = city;
        }

    }
    }

public class Main {
    public static void main(String[] args) {

        Person p1 = new Person("John.Davidson/Berlin Michael.Barton/Rome Ivan.Perkinson/Munich");
        System.out.println(p1.surname + p1.name + p1.city);
// the result is the only the last persons info
}
}


问:
Feature Importance with Elastic Net?
I'm trying to see if I can do and plot the feature importance of a dataset I have using Elastic Net to figure out the feature importance. So far I have written the following code but I am unsure of what I can do to output the importance of each feature:

```<code>model = ElasticNet(l1_ratio=cv_model.l1_ratio_, alpha = cv_model.alpha_, max_iter=cv_model.n_iter_, fit_intercept=True, random_state=42)
model.fit(X, y)
</code>```

And then I have followed a guide on how to output a plot showing the importance:

```<code>feature_importance = pd.Series(index = X.columns, data = np.abs(model.coef_))

n_selected_features = (feature_importance>0).sum()
print('{0:d} features, reduction of {1:2.2f}%'.format(
    n_selected_features,(1-n_selected_features/len(feature_importance))*100))

feature_importance.sort_values().tail(30).plot(kind = 'bar', figsize = (20,12))
</code>```

What I fail to see is how this second line of code is related to the first one or if it has anything to do with elastic net as it does not use any of its data or variables? Am I doing something wrong?

I'm aware that there are better methods to do feature importance. This is for an exploratory statistics project where I must explain why certain methods give certain results but I am not sure if my results are correct in the first place. This is the plot that I am getting:

Title: Feature Importance with Elastic Net?

Body:
I'm trying to see if I can do and plot the feature importance of a dataset I have using Elastic Net to figure out the feature importance. So far I have written the following code but I am unsure of what I can do to output the importance of each feature:

model = ElasticNet(l1_ratio=cv_model.l1_ratio_, alpha = cv_model.alpha_, max_iter=cv_model.n_iter_, fit_intercept=True, random_state=42)
model.fit(X, y)

And then I have followed a guide on how to output a plot showing the importance:

feature_importance = pd.Series(index = X.columns, data = np.abs(model.coef_))

n_selected_features = (feature_importance>0).sum()
print('{0:d} features, reduction of {1:2.2f}%'.format(
    n_selected_features,(1-n_selected_features/len(feature_importance))*100))

feature_importance.sort_values().tail(30).plot(kind = 'bar', figsize = (20,12))

What I fail to see is how this second line of code is related to the first one or if it has anything to do with elastic net as it does not use any of its data or variables? Am I doing something wrong?

I'm aware that there are better methods to do feature importance. This is for an exploratory statistics project where I must explain why certain methods give certain results but I am not sure if my results are correct in the first place. This is the plot that I am getting:


问:
Elasticsearch error with an incomprehensible error message
I'm currently trying out Elasticsearch. I've already made the first steps and installed it following the official instructions. But in my initial attempts, I get this incomprehensible error message. See this text below:

```<code>ÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöü
Ô£à Elasticsearch security features have been automatically configured!
Ô£à Authentication is enabled and cluster connections are encrypted.

Ôä╣´©Å  Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
  77kydX8WQaI6V5RXnEDB

Ôä╣´©Å  HTTP CA certificate SHA-256 fingerprint:
  b40aedc367164cf6d0f6a09ea2d6e6b258e41b94bbcd43db8f268238d590d472

Ôä╣´©Å  Configure Kibana to use this cluster:
ÔÇó Run Kibana and click the configuration link in the terminal when Kibana starts.
ÔÇó Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):
  eyJ2ZXIiOiI4LjUuMyIsImFkciI6WyIxOTIuMTY4LjEuMTc5OjkyMDAiXSwiZmdyIjoiYjQwYWVkYzM2NzE2NGNmNmQwZjZhMDllYTJkNmU2YjI1OGU0MWI5NGJiY2Q0M2RiOGYyNjgyMzhkNTkwZDQ3MiIsImtleSI6IkFNZFBUNFVCenk4T19Mcy1lNmFvOmFoWnBnM1AtU3JDcEdlTXFPLS00M0EifQ==

Ôä╣´©Å  Configure other nodes to join this cluster:
ÔÇó On this node:
  Ôüâ Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.
  Ôüâ Uncomment the transport.host setting at the end of config/elasticsearch.yml.
  Ôüâ Restart Elasticsearch.
ÔÇó On other nodes:
  Ôüâ Start Elasticsearch with `bin/elasticsearch --enrollment-token <token>`, using the enrollment token that you generated.
ÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöü
-----------------------------------------------------------------------
</code>```

and this message, when I try to run the Elasticsearch on port 9200:

```<code>[2022-12-26T17:55:47,141][WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [DESKTOP-VLBL46H] received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0:0:0:1]:60933}
</code>```

Body:
I'm currently trying out Elasticsearch. I've already made the first steps and installed it following the official instructions. But in my initial attempts, I get this incomprehensible error message. See this text below:

ÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöü
Ô£à Elasticsearch security features have been automatically configured!
Ô£à Authentication is enabled and cluster connections are encrypted.

Ôä╣´©Å  Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
  77kydX8WQaI6V5RXnEDB

Ôä╣´©Å  HTTP CA certificate SHA-256 fingerprint:
  b40aedc367164cf6d0f6a09ea2d6e6b258e41b94bbcd43db8f268238d590d472

Ôä╣´©Å  Configure Kibana to use this cluster:
ÔÇó Run Kibana and click the configuration link in the terminal when Kibana starts.
ÔÇó Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):
  eyJ2ZXIiOiI4LjUuMyIsImFkciI6WyIxOTIuMTY4LjEuMTc5OjkyMDAiXSwiZmdyIjoiYjQwYWVkYzM2NzE2NGNmNmQwZjZhMDllYTJkNmU2YjI1OGU0MWI5NGJiY2Q0M2RiOGYyNjgyMzhkNTkwZDQ3MiIsImtleSI6IkFNZFBUNFVCenk4T19Mcy1lNmFvOmFoWnBnM1AtU3JDcEdlTXFPLS00M0EifQ==

Ôä╣´©Å  Configure other nodes to join this cluster:
ÔÇó On this node:
  Ôüâ Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.
  Ôüâ Uncomment the transport.host setting at the end of config/elasticsearch.yml.
  Ôüâ Restart Elasticsearch.
ÔÇó On other nodes:
  Ôüâ Start Elasticsearch with `bin/elasticsearch --enrollment-token <token>`, using the enrollment token that you generated.
ÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöüÔöü
-----------------------------------------------------------------------

and this message, when I try to run the Elasticsearch on port 9200:

[2022-12-26T17:55:47,141][WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [DESKTOP-VLBL46H] received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0:0:0:1]:60933}


问:
How can I use Azure functions to refresh an Azure Key Vault secret every 1H? Have code but not working
Hello,
I'm trying to refresh a token using an API call every 1 hour by a python function on Azure functions,

The base code is as below:

```<code>import requests
import os
# Set the API endpoint URL and the refresh token
api_endpoint = "HIDDEN"
refresh_token = "HIDDEN"
CLIENT_ID = "HIDDEN"
CLIENT_SECRET = "HIDDEN"

# Set the request headers
headers = {
    "Content-Type": "application/x-www-form-urlencoded",
}

# Set the request payload
payload = {
    "grant_type": "refresh_token",
    "refresh_token": refresh_token,
    "client_id": CLIENT_ID,
    "client_secret": CLIENT_SECRET
}

# Send the request to the API endpoint
response = requests.post(api_endpoint, headers=headers, data=payload)

# If the request is successful, print the new auth token
if response.status_code == 200:
    data = response.json()
    new_auth_token = data["access_token"]
    print(new_auth_token)
</code>```

In azure functions, it's like this:

```<code>import requests
import json
from azure.keyvault.secrets import SecretClient
from azure.identity import DefaultAzureCredential
import datetime
import logging
import azure.functions as func

def main(mytimer: func.TimerRequest) -> None:
    utc_timestamp = datetime.datetime.utcnow().replace(
        tzinfo=datetime.timezone.utc).isoformat()
    # Retrieve secrets from Azure Key Vault
    credential = DefaultAzureCredential()
    client = SecretClient(vault_url="HIDDEN", credential=credential)
    client_id = client.get_secret("Client__Id").value
    client_secret = client.get_secret("Client__Secret").value
    refresh_token = client.get_secret("Refresh__Token").value
    access_token = client.get_secret("Access__Token").value

    # Request new access token using refresh token
    url = "HIDDEN"
    headers = {
        "Content-Type": "application/x-www-form-urlencoded"
    }
    data = {
        "grant_type": "refresh_token",
        "client_id": client_id,
        "client_secret": client_secret,
        "refresh_token": refresh_token
    }
    response = requests.post(url, headers=headers, data=data)
    return func.HttpResponse(response)
    # Check if request was successful
    if response.status_code == 200:
        # Store new access token in Azure Key Vault
        access_token = response.json()["access_token"]
        client.set_secret("AT", access_token)
    else:
        print("Error refreshing access token:", response.status_code)

    if mytimer.past_due:
        logging.info('The timer is past due!')

    logging.info('Python timer trigger function ran at %s', utc_timestamp)

</code>```

When I run it, it returns "202 Accepted", but the secret on azure key vault does not change. If I return the output in a func.HttpResponse() then it shows as follows: The access token expiry UTC time '12/26/2022 1:20:29 PM' is earlier than current UTC time '12/26/2022 2:31:41 PM

Tried powershell instead of python

Body:
Hello,
I'm trying to refresh a token using an API call every 1 hour by a python function on Azure functions,

The base code is as below:

import requests
import os
# Set the API endpoint URL and the refresh token
api_endpoint = "HIDDEN"
refresh_token = "HIDDEN"
CLIENT_ID = "HIDDEN"
CLIENT_SECRET = "HIDDEN"

# Set the request headers
headers = {
    "Content-Type": "application/x-www-form-urlencoded",
}

# Set the request payload
payload = {
    "grant_type": "refresh_token",
    "refresh_token": refresh_token,
    "client_id": CLIENT_ID,
    "client_secret": CLIENT_SECRET
}

# Send the request to the API endpoint
response = requests.post(api_endpoint, headers=headers, data=payload)

# If the request is successful, print the new auth token
if response.status_code == 200:
    data = response.json()
    new_auth_token = data["access_token"]
    print(new_auth_token)

In azure functions, it's like this:

import requests
import json
from azure.keyvault.secrets import SecretClient
from azure.identity import DefaultAzureCredential
import datetime
import logging
import azure.functions as func

def main(mytimer: func.TimerRequest) -> None:
    utc_timestamp = datetime.datetime.utcnow().replace(
        tzinfo=datetime.timezone.utc).isoformat()
    # Retrieve secrets from Azure Key Vault
    credential = DefaultAzureCredential()
    client = SecretClient(vault_url="HIDDEN", credential=credential)
    client_id = client.get_secret("Client__Id").value
    client_secret = client.get_secret("Client__Secret").value
    refresh_token = client.get_secret("Refresh__Token").value
    access_token = client.get_secret("Access__Token").value

    # Request new access token using refresh token
    url = "HIDDEN"
    headers = {
        "Content-Type": "application/x-www-form-urlencoded"
    }
    data = {
        "grant_type": "refresh_token",
        "client_id": client_id,
        "client_secret": client_secret,
        "refresh_token": refresh_token
    }
    response = requests.post(url, headers=headers, data=data)
    return func.HttpResponse(response)
    # Check if request was successful
    if response.status_code == 200:
        # Store new access token in Azure Key Vault
        access_token = response.json()["access_token"]
        client.set_secret("AT", access_token)
    else:
        print("Error refreshing access token:", response.status_code)

    if mytimer.past_due:
        logging.info('The timer is past due!')

    logging.info('Python timer trigger function ran at %s', utc_timestamp)

When I run it, it returns "202 Accepted", but the secret on azure key vault does not change. If I return the output in a func.HttpResponse() then it shows as follows: The access token expiry UTC time '12/26/2022 1:20:29 PM' is earlier than current UTC time '12/26/2022 2:31:41 PM

Tried powershell instead of python


问:
ged_gpu_timestamp: GED_ERROR_FAIL eErr = 0, -2
I'm trying to decode heic / heif images in my application using bitmapfacotry and bitmapregiondecoder, however each time the heic and heif image was loadeed, this error keep appearing and never stops until I swipe to the next image and appear forever again.

What's more, when I swipe between heic / heif images, sometimes the app does not respond to it at all and this error just keep flushing my logcat.

I have no clue how to solve this issue, Google it return zero result for me.

The only thing I can find is the android kernel source code for MediaTek which was like 10 years ago.

I'm using Oppo's Reno 8 Pro +

CPU is MediaTek Dimensity 8100 Max


问:
Why am I allowed only 1 instance of a Tensorflow_IO AudioIOTensor at a time?
I'm trying to learn how to handle audio data in Tensorflow and have downloaded the Kaggle Speech Accent Archive. I'm trying to compare two ways of doing this in Tensorflow. The first (I believe) reads the binary file, then in a separate step, decodes it with the knowledge the file is an mp3 file. The second method reads the file into an AudioIO tensor, which (I assume) figures out that the file is an mp3 file, stores some metadata, but then is "lazy", so it won't load all the data until specifically told to do so. the code I'm using to compare the two methods is as follows:

```<code>import pathlib
import tensorflow as tf
import tensorflow_io as tfio
DATA_DIR = <Path to data>

data_path = pathlib.Path(DATA_DIR)
mp3Files = [x for x in data_path.iterdir() if '.mp3' in x.name]

def load_audios(file_list):
    dataset = []
    for curr_file in file_list:
        curr_file_path = curr_file.as_posix()
        audio_binary = tf.io.read_file(curr_file_path)
        audio1 = tfio.audio.decode_mp3(audio_binary)
        audio2 = tfio.audio.AudioIOTensor(curr_file_path)
        dataset.append([audio1,audio2, curr_file.name])
    return dataset

test = load_audios(mp3Files[0:3])
</code>```

This results in the following 3 files being read:

```<code>>> test[0][-1], test[1][-1], test[2][-1]
('afrikaans1.mp3', 'afrikaans2.mp3', 'afrikaans3.mp3')
</code>```

The AudioTensors - test[0][1].to_tensor(), test[1][1].to_tensor() and test[2][1].to_tensor() all give the same result:

```<code><tf.Tensor: shape=(1185408, 1), dtype=float32, numpy=
array([[ 0.00209848],
       [ 0.00333662],
       [ 0.00259154],
       ...,
       [-0.00472141],
       [-0.00558133],
       [-0.00375525]], dtype=float32)>
</code>```

This matches the values for the EagerTensor given by test[2][0] (i.e. the last file in the list returned by load_audios), but test[0][0] and test[1][0] give the following two different results:

```<code><tf.Tensor: shape=(916057, 1), dtype=float32, numpy=
array([[ 0.00905748],
       [ 0.01102116],
       [ 0.00883307],
       ...,
       [-0.00131128],
       [-0.00134344],
       [-0.00090137]], dtype=float32)>
</code>```

and

```<code><tf.Tensor: shape=(968502, 1), dtype=float32, numpy=
array([[-4.2711912e-05],
       [-3.0772724e-05],
       [-1.6126218e-06],
       ...,
       [ 2.9933560e-03],
       [ 4.1506598e-03],
       [ 2.9126832e-03]], dtype=float32)>
</code>```

Why does this happen? How can I have multiple different AudioIOTensors at the same time?

Body:
I'm trying to learn how to handle audio data in Tensorflow and have downloaded the Kaggle Speech Accent Archive. I'm trying to compare two ways of doing this in Tensorflow. The first (I believe) reads the binary file, then in a separate step, decodes it with the knowledge the file is an mp3 file. The second method reads the file into an AudioIO tensor, which (I assume) figures out that the file is an mp3 file, stores some metadata, but then is "lazy", so it won't load all the data until specifically told to do so. the code I'm using to compare the two methods is as follows:

import pathlib
import tensorflow as tf
import tensorflow_io as tfio
DATA_DIR = <Path to data>

data_path = pathlib.Path(DATA_DIR)
mp3Files = [x for x in data_path.iterdir() if '.mp3' in x.name]

def load_audios(file_list):
    dataset = []
    for curr_file in file_list:
        curr_file_path = curr_file.as_posix()
        audio_binary = tf.io.read_file(curr_file_path)
        audio1 = tfio.audio.decode_mp3(audio_binary)
        audio2 = tfio.audio.AudioIOTensor(curr_file_path)
        dataset.append([audio1,audio2, curr_file.name])
    return dataset

test = load_audios(mp3Files[0:3])

This results in the following 3 files being read:

>> test[0][-1], test[1][-1], test[2][-1]
('afrikaans1.mp3', 'afrikaans2.mp3', 'afrikaans3.mp3')

The AudioTensors - test[0][1].to_tensor(), test[1][1].to_tensor() and test[2][1].to_tensor() all give the same result:

<tf.Tensor: shape=(1185408, 1), dtype=float32, numpy=
array([[ 0.00209848],
       [ 0.00333662],
       [ 0.00259154],
       ...,
       [-0.00472141],
       [-0.00558133],
       [-0.00375525]], dtype=float32)>

This matches the values for the EagerTensor given by test[2][0] (i.e. the last file in the list returned by load_audios), but test[0][0] and test[1][0] give the following two different results:

<tf.Tensor: shape=(916057, 1), dtype=float32, numpy=
array([[ 0.00905748],
       [ 0.01102116],
       [ 0.00883307],
       ...,
       [-0.00131128],
       [-0.00134344],
       [-0.00090137]], dtype=float32)>

and

<tf.Tensor: shape=(968502, 1), dtype=float32, numpy=
array([[-4.2711912e-05],
       [-3.0772724e-05],
       [-1.6126218e-06],
       ...,
       [ 2.9933560e-03],
       [ 4.1506598e-03],
       [ 2.9126832e-03]], dtype=float32)>

Why does this happen? How can I have multiple different AudioIOTensors at the same time?


问:
Nominatim Library, invalid postal code in C#, visual studio
I have a project to do that requires the calculation of distances. For that, i'm using the Nominatim Library in order to get coordinates with postal codes. However, I made an exception that would be thrown if the postal code was invalid and it keeps happening, even though they're real portuguese postal codes.

here is the code used to verify if the postal code is valid:

```<code>private static bool ValidPostalCode(string postalCode)
        {
            RestResponse response = EnviaRequesicao(codigoPostal);

            if (response.IsSuccessful)
            {
                JArray resultes = JArray.Parse(response.Content);

                return resultes.Count > 0;
            }

            else
                return false;
        }
</code>```

and in the main i'm typing this:

```<code>Morada morada = new Morada("4770-713",Distrito.Braga );
morada.Rua = "Rua das fontainhas";
morada.NumeroPorta = 5;
morada.Cidade = "Joane";
Console.WriteLine($"{morada.Rua}, {morada.CodigoPostal} {morada.Cidade} ( {morada.Coordenadas} )");
</code>```

the exception is thrown in the class's constructor:

```<code>public Morada(string codigoPostal, Distrito distrito)
        {
            bool valido = CodigoPostalValido(codigoPostal);

            if (valido)
            {
                this.CodigoPostal = codigoPostal;
                this.Coordenadas = ObterCoordenadas(codigoPostal);
            }
            else
                throw new CodigoPostalInvalidoException("RNCCI.Modelos.Morada.Morada");

(...)
}
</code>```

I tried changing the postal code to only the first 4 numbers, but it also doesn't work.

/EDIT/
I did a debug and the problem is in the EnviaRequesicao method, that sends the request.

```<code>private static RestResponse EnviaRequesicao(string postalCode)
        {
            //cria o link que usa o codigo postal
            string requesitoUrl = $"https://nominatim.openstreetmap.org/search?format=json&limit=1&postalcode={postalCode}";

            //cria o cliente com o link do requesito
            RestClient cliente = new RestClient(requesitoUrl);

            //cria um objeto de requesito
            RestRequest requesito = new RestRequest("GET");

            RestResponse resposta = cliente.Execute(requesito);
            return resposta;
        }
</code>```

resposta has the statusCode of NotFound, even though the URL exists...

Body:
I have a project to do that requires the calculation of distances. For that, i'm using the Nominatim Library in order to get coordinates with postal codes. However, I made an exception that would be thrown if the postal code was invalid and it keeps happening, even though they're real portuguese postal codes.

here is the code used to verify if the postal code is valid:

private static bool ValidPostalCode(string postalCode)
        {
            RestResponse response = EnviaRequesicao(codigoPostal);

            if (response.IsSuccessful)
            {
                JArray resultes = JArray.Parse(response.Content);

                return resultes.Count > 0;
            }

            else
                return false;
        }

and in the main i'm typing this:

Morada morada = new Morada("4770-713",Distrito.Braga );
morada.Rua = "Rua das fontainhas";
morada.NumeroPorta = 5;
morada.Cidade = "Joane";
Console.WriteLine($"{morada.Rua}, {morada.CodigoPostal} {morada.Cidade} ( {morada.Coordenadas} )");

the exception is thrown in the class's constructor:

public Morada(string codigoPostal, Distrito distrito)
        {
            bool valido = CodigoPostalValido(codigoPostal);

            if (valido)
            {
                this.CodigoPostal = codigoPostal;
                this.Coordenadas = ObterCoordenadas(codigoPostal);
            }
            else
                throw new CodigoPostalInvalidoException("RNCCI.Modelos.Morada.Morada");

(...)
}

I tried changing the postal code to only the first 4 numbers, but it also doesn't work.

/EDIT/
I did a debug and the problem is in the EnviaRequesicao method, that sends the request.

private static RestResponse EnviaRequesicao(string postalCode)
        {
            //cria o link que usa o codigo postal
            string requesitoUrl = $"https://nominatim.openstreetmap.org/search?format=json&limit=1&postalcode={postalCode}";

            //cria o cliente com o link do requesito
            RestClient cliente = new RestClient(requesitoUrl);

            //cria um objeto de requesito
            RestRequest requesito = new RestRequest("GET");

            RestResponse resposta = cliente.Execute(requesito);
            return resposta;
        }

resposta has the statusCode of NotFound, even though the URL exists...