1. What is this and where I can find relevant script?
2. The first time the script works fine, the second time it gives an error.
I took the script from GitHub repository and did not change it.
Where should I look for the problem and a solution?
Scripting errors (TS2332 and PDF error: ENONT)
Re: Scripting errors (TS2332 and PDF error: ENONT)
Hi Arsen,
This problem happens because the second time the job is processed, Switch fails to add the dataset with the same name. It does not replace it by default. 2 solutions:
This problem happens because the second time the job is processed, Switch fails to add the dataset with the same name. It does not replace it by default. 2 solutions:
- use Export metadata and remove the dataset before processing the job a second time
- edit the script and remove the dataset before adding it:
Code: Select all
try {
await job.removeDataset(datasetName);
// await job.log(LogLevel.Debug, `Removed dataset '${datasetName}'`);
} catch (error) {
// dataset does not exist
// await job.log(LogLevel.Debug, `Dataset '${datasetName}' did not exist`);
}
Laurent De Wilde, Solution Architect @ Enfocus
Re: Scripting errors (TS2332 and PDF error: ENONT)
Thanks a lot, Laurent. I can handle it from here.