其他命令如s deploy, sync和层相关的操作都没有问题,但是执行s local invoke时,报以下错误:
1.10.3: Pulling from aliyunfc/runtime-python3.6 node:internal/streams/writable:315 throw new ERR_INVALID_ARG_TYPE( ^
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received undefined at new NodeError (node:internal/errors:393:5) at _write (node:internal/streams/writable:315:13) at Writable.write (node:internal/streams/writable:337:10) at o (C:\Users\myusername.s\components\devsapp.cn\devsapp\fc-core\dist\index.js:223:27) at processLine (C:\Users\myusername.s\components\devsapp.cn\devsapp\fc-local-invoke\dist\index.js:57777:11) at pump (C:\Users\myusername.s\components\devsapp.cn\devsapp\fc-local-invoke\dist\index.js:57766:9) at IncomingMessage.onStreamEvent (C:\Users\myusername.s\components\devsapp.cn\devsapp\fc-local-invoke\dist\index.js:57757:5) at IncomingMessage.emit (node:events:513:28) at IncomingMessage.emit (node:domain:489:12) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Readable.push (node:internal/streams/readable:234:10) at HTTPParser.parserOnBody (node:_http_common:129:24) at Socket.socketOnData (node:_http_client:534:22) at Socket.emit (node:events:513:28) at Socket.emit (node:domain:489:12) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Readable.push (node:internal/streams/readable:234:10) at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) { code: 'ERR_INVALID_ARG_TYPE' }
Node.js v18.12.1
想咨询下原因是什么 如何解决 谢谢!
这是由于Python代码中的输出类型不正确导致的,可能是输出的类型不是字符串或Buffer或Uint8Array,请检查Python代码中的输出类型是否正确。
chunk”参数的类型必须为string或Buffer或Uint8Array的实例,chunk参数现在可以是Uint8Array实例。 参数 chunk||||要推入读取队列的数据块。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。