(node:22529) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token T in JSON at position 11 at JSON.parse () at API (api.js:7:8) at Object. (api.js:16:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19)(node:22529) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)(node:22529) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
按照示例的中的,直接用 JavaScript 语言吧。
😕
我们自己写代码块的时候也遇到这个问题
作为范例的输入数据,像你这里的["1","2"],由于无法定义其 type,系统一定会以 string 读取进代码块的,所以 python 不知道如何把"["与 int 相加,就会报错
实际使用中,如果使用 webhook 或者代码块的 output 作为这里的 input,是可以识别 output 的 type,并能正常读取内容的
希望明道能够添加定义代码块 input 内容的 type,或者至少在测试阶段可以定义,后续用其他代码块取
还是不对,经过测试,似乎 float 函数会识别数组里面的[和"
这两个符号。
不知道这个问题咋个解决,如何实现批量求和?
Python 的输出格式是这样的
可能是 100 条的限制?
![image.png]()
你帮我看看这个代码有问题?
节点的全部配置也截图看下。
测试数据没问题,换成字段以后就报错了:
代码错误
(node:22529) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token T in JSON at position 11 at JSON.parse () at API (api.js:7:8) at Object. (api.js:16:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19)(node:22529) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)(node:22529) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
可以参考三。4 https://bbs.mingdao.net/topic/398