Import Script Error: Script failed with error: Script output property '{Project with id=17 key=EMB Applications}.key' should be of type string

I am currently working on importing from FogBugz, and I have it to the point where it is getting the issues and the updated issues. But after it runs those two parts, I get the following error below. I have tried to trace it down, but I cannot find where this is occurring. I am still trying to find code that tells me who the client functions are run and in which order, which I think would help, but unsure what to do here to resolve this issue. Any help would be useful.

24/01/23 17:48:56,201 ERROR [@tzJobProcessor0] [ImportLogging                 ] [@] Script failed with error: Script output property '{Project with id=17  key=EMB Applications}.key' should be of type string
 jetbrains.youtrack.scripts.persistent.ScriptOutputPropertyException: Script output property '{Project with id=17  key=EMB Applications}.key' should be stored as type string.
    at jetbrains.youtrack.scripts.persistent.ScriptableExtensionsKt.getProperty(ScriptableExtensions.kt:53)
    at jetbrains.youtrack.imports.runtime.JsClientAdapter.getIssueUpdates(JsClientAdapter.kt:781)
    at jdk.internal.reflect.GeneratedMethodAccessor318.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at jetbrains.youtrack.imports.runtime.ClientInvocationsLoggingHandler.invoke(ClientInvocationsLoggingHandler.kt:19)
    at com.sun.proxy.$Proxy474.getIssueUpdates(Unknown Source)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt$defineContinuousClientRequest$1.invoke(ImportProcessingDocuments.kt:204)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt$defineContinuousClientRequest$1.invoke(ImportProcessingDocuments.kt:201)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt.doProcessDocuments(ImportProcessingDocuments.kt:246)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt.access$doProcessDocuments(ImportProcessingDocuments.kt:1)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt$processDocumentsInProject$2.invoke(ImportProcessingDocuments.kt:158)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt$processDocumentsInProject$2.invoke(ImportProcessingDocuments.kt:157)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt.withTimeInterval(ImportProcessingDocuments.kt:167)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt.processDocumentsInProject(ImportProcessingDocuments.kt:157)
    at jetbrains.youtrack.imports.runtime.ImportProcedureKt.processProjects(ImportProcedure.kt:182)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt.doImport(ImportExtensions.kt:183)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt.access$doImport(ImportExtensions.kt:1)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3$1$1.invoke(ImportExtensions.kt:113)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3$1$1.invoke(ImportExtensions.kt:103)
    at jetbrains.youtrack.scripts.internals.ExceptionsProcessingKt.withScriptingAndDBExceptionsProcessing(ExceptionsProcessing.kt:77)
    at jetbrains.youtrack.scripts.internals.ExceptionsProcessingKt.withScriptingAndDBExceptionsProcessing$default(ExceptionsProcessing.kt:17)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3$1.invoke(ImportExtensions.kt:103)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3$1.invoke(ImportExtensions.kt:102)
    at jetbrains.youtrack.scripts.internals.RunInContextKt.runInContext(RunInContext.kt:17)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3.invoke(ImportExtensions.kt:102)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3.invoke(ImportExtensions.kt:97)
    at jetbrains.youtrack.api.application.ThreadLocalToggleKt.runWith(ThreadLocalToggle.kt:27)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt.doStart(ImportExtensions.kt:97)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$start$1.invoke(ImportExtensions.kt:78)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$start$1.invoke(ImportExtensions.kt:77)
    at jetbrains.youtrack.scheduling.LocalQuartzExecutor$executeNonTransactional$1.invoke(LocalQuartzExecutor.kt:29)
    at jetbrains.youtrack.scheduling.LocalQuartzExecutor$executeNonTransactional$1.invoke(LocalQuartzExecutor.kt:28)
    at jetbrains.youtrack.core.jobProcessor.NamedThreadJobProcessorKt.withLocalName(NamedThreadJobProcessor.kt:37)
    at jetbrains.youtrack.scheduling.QuartzJobProcessorKt.asNonTxLocalRunnable$lambda-0(QuartzJobProcessor.kt:41)
    at jetbrains.exodus.core.execution.RunnableJob.execute(RunnableJob.java:41)
    at jetbrains.exodus.core.execution.Job.run(Job.java:135)
    at jetbrains.exodus.core.execution.ThreadJobProcessor.executeJob(ThreadJobProcessor.java:132)
    at jetbrains.exodus.core.execution.JobProcessorQueueAdapter.doExecuteJob(JobProcessorQueueAdapter.java:251)
    at jetbrains.exodus.core.execution.JobProcessorQueueAdapter.doJobs(JobProcessorQueueAdapter.java:161)
    at jetbrains.exodus.core.execution.ThreadJobProcessor.run(ThreadJobProcessor.java:110)
    at java.base/java.lang.Thread.run(Thread.java:829)
24/01/23 17:48:56,217 ERROR [@tzJobProcessor0] [ImportLogging                 ] [@] Import failed with error: Script output property '{Project with id=17  key=EMB Applications}.key' should be of type string
 jetbrains.youtrack.scripts.sandbox.EvaluationException: Script output property '{Project with id=17  key=EMB Applications}.key' should be stored as type string.
    at jetbrains.youtrack.scripts.internals.ExceptionsProcessingKt.withScriptingAndDBExceptionsProcessing$createException(ExceptionsProcessing.kt:28)
    at jetbrains.youtrack.scripts.internals.ExceptionsProcessingKt.withScriptingAndDBExceptionsProcessing$wrapSpecifically(ExceptionsProcessing.kt:61)
    at jetbrains.youtrack.scripts.internals.ExceptionsProcessingKt.withScriptingAndDBExceptionsProcessing(ExceptionsProcessing.kt:86)
    at jetbrains.youtrack.scripts.internals.ExceptionsProcessingKt.withScriptingAndDBExceptionsProcessing$default(ExceptionsProcessing.kt:17)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3$1.invoke(ImportExtensions.kt:103)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3$1.invoke(ImportExtensions.kt:102)
    at jetbrains.youtrack.scripts.internals.RunInContextKt.runInContext(RunInContext.kt:17)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3.invoke(ImportExtensions.kt:102)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3.invoke(ImportExtensions.kt:97)
    at jetbrains.youtrack.api.application.ThreadLocalToggleKt.runWith(ThreadLocalToggle.kt:27)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt.doStart(ImportExtensions.kt:97)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$start$1.invoke(ImportExtensions.kt:78)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$start$1.invoke(ImportExtensions.kt:77)
    at jetbrains.youtrack.scheduling.LocalQuartzExecutor$executeNonTransactional$1.invoke(LocalQuartzExecutor.kt:29)
    at jetbrains.youtrack.scheduling.LocalQuartzExecutor$executeNonTransactional$1.invoke(LocalQuartzExecutor.kt:28)
    at jetbrains.youtrack.core.jobProcessor.NamedThreadJobProcessorKt.withLocalName(NamedThreadJobProcessor.kt:37)
    at jetbrains.youtrack.scheduling.QuartzJobProcessorKt.asNonTxLocalRunnable$lambda-0(QuartzJobProcessor.kt:41)
    at jetbrains.exodus.core.execution.RunnableJob.execute(RunnableJob.java:41)
    at jetbrains.exodus.core.execution.Job.run(Job.java:135)
    at jetbrains.exodus.core.execution.ThreadJobProcessor.executeJob(ThreadJobProcessor.java:132)
    at jetbrains.exodus.core.execution.JobProcessorQueueAdapter.doExecuteJob(JobProcessorQueueAdapter.java:251)
    at jetbrains.exodus.core.execution.JobProcessorQueueAdapter.doJobs(JobProcessorQueueAdapter.java:161)
    at jetbrains.exodus.core.execution.ThreadJobProcessor.run(ThreadJobProcessor.java:110)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: jetbrains.youtrack.scripts.persistent.ScriptOutputPropertyException: Script output property '{Project with id=17  key=EMB Applications}.key' should be stored as type string.
    at jetbrains.youtrack.scripts.persistent.ScriptableExtensionsKt.getProperty(ScriptableExtensions.kt:53)
    at jetbrains.youtrack.imports.runtime.JsClientAdapter.getIssueUpdates(JsClientAdapter.kt:781)
    at jdk.internal.reflect.GeneratedMethodAccessor318.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at jetbrains.youtrack.imports.runtime.ClientInvocationsLoggingHandler.invoke(ClientInvocationsLoggingHandler.kt:19)
    at com.sun.proxy.$Proxy474.getIssueUpdates(Unknown Source)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt$defineContinuousClientRequest$1.invoke(ImportProcessingDocuments.kt:204)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt$defineContinuousClientRequest$1.invoke(ImportProcessingDocuments.kt:201)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt.doProcessDocuments(ImportProcessingDocuments.kt:246)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt.access$doProcessDocuments(ImportProcessingDocuments.kt:1)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt$processDocumentsInProject$2.invoke(ImportProcessingDocuments.kt:158)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt$processDocumentsInProject$2.invoke(ImportProcessingDocuments.kt:157)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt.withTimeInterval(ImportProcessingDocuments.kt:167)
    at jetbrains.youtrack.imports.runtime.ImportProcessingDocumentsKt.processDocumentsInProject(ImportProcessingDocuments.kt:157)
    at jetbrains.youtrack.imports.runtime.ImportProcedureKt.processProjects(ImportProcedure.kt:182)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt.doImport(ImportExtensions.kt:183)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt.access$doImport(ImportExtensions.kt:1)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3$1$1.invoke(ImportExtensions.kt:113)
    at jetbrains.youtrack.imports.model.ImportExtensionsKt$doStart$3$1$1.invoke(ImportExtensions.kt:103)
    at jetbrains.youtrack.scripts.internals.ExceptionsProcessingKt.withScriptingAndDBExceptionsProcessing(ExceptionsProcessing.kt:77)
    ... 21 more

0
1 comment
Hello,

The error appears because the `key` parameter has non-string content, so please check the code handling the `key` parameter.
0

Please sign in to leave a comment.